Mike Frysinger vapier@gentoo.org writes:
Newer versions of gcc/glibc with fortify checks enabled will complain about the handling of the network's szNames field. Currently it is always defined with a length of one which means writing more then a single byte will trigger: In function 'strcpy', inlined from '_ILCreateEntireNetwork' at dlls/shell32/pidl.c:1762:15: warning: call to __builtin___strcpy_chk will always overflow destination buffer and then at runtime, we hit an abort().
Since this field is really serving as the header to an arbitrary buffer, using a flexible array instead should solve the issue.
What you want is ANYSIZE_ARRAY, which already exists.