diff dw.h @ 2083:f1acc157b2dd

Win: Correctly show "IE" as HTML renderer if built with Edge support... but a supported version of Edge cannot be detected. Also bump the size of the fields in the DWEnv struct to be 65 characters in line with the size of Linux utsname fields so gcc fortify won't complain about possible truncation during strncpy().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 31 May 2020 15:15:34 +0000
parents 24875681eec5
children cdb94c6fd611
line wrap: on
line diff
--- a/dw.h	Sun May 31 05:26:02 2020 +0000
+++ b/dw.h	Sun May 31 15:15:34 2020 +0000
@@ -1331,15 +1331,18 @@
 typedef unsigned long DWTID;
 #endif
 
+/* Use at least the linux utsname limit to avoid gcc fortify warnings */
+#define _DW_ENV_STRING_SIZE 65
+
 typedef struct _dwenv {
    /* Operating System Name and DW Build Date/Time */
-   char osName[30], buildDate[30], buildTime[30];
+   char osName[_DW_ENV_STRING_SIZE], buildDate[_DW_ENV_STRING_SIZE], buildTime[_DW_ENV_STRING_SIZE];
    /* Versions and builds */
    short MajorVersion, MinorVersion, MajorBuild, MinorBuild;
    /* Dynamic Window version */
    short DWMajorVersion, DWMinorVersion, DWSubVersion;
    /* Which HTML engine is compiled in */
-   char htmlEngine[30];
+   char htmlEngine[_DW_ENV_STRING_SIZE];
 } DWEnv;