# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1590938134 0 # Node ID f1acc157b2dd7ec307c892756e6febf3a69301e4 # Parent 3144912829e2e3806e22cd215e2e48dade4cbc05 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(). diff -r 3144912829e2 -r f1acc157b2dd dw.h --- 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; diff -r 3144912829e2 -r f1acc157b2dd win/dw.c --- a/win/dw.c Sun May 31 05:26:02 2020 +0000 +++ b/win/dw.c Sun May 31 15:15:34 2020 +0000 @@ -12423,7 +12423,7 @@ strcpy(env->buildTime, __TIME__); #if (defined(BUILD_DLL) || defined(BUILD_HTML)) # ifdef BUILD_EDGE - strcpy(env->htmlEngine, "EDGE"); + strcpy(env->htmlEngine, _DW_EDGE_DETECTED ? "EDGE" : "IE"); # else strcpy(env->htmlEngine, "IE"); # endif