07.10.2024 13:13, Bernhard Beschow wrote:
The patch fixes the following errors generated by GCC 14.2:

../src/net/tap-win32.c:343:19: error: '%s' directive output may be truncated 
writing up to 255 bytes into a region of size 176 [-Werror=format-truncation=]
   343 |              "%s\\%s\\Connection",
       |                   ^~
   344 |              NETWORK_CONNECTIONS_KEY, enum_name);
       |                                       ~~~~~~~~~
...

      for (;;) {
          char enum_name[256];
-        char unit_string[256];
+        char unit_string[512];

Is it maybe better to use something like g_format_string() or asprintf() here?
Here and also in net/slirp.c

Thanks,

/mjt

Reply via email to