hello there,
I just compiled the commoncpp package with compiler flag
-D_FORTIFY_SOURCE=2. It said
In function 'void* memset(void*, int, size_t)',
inlined from 'void ost::IPV4Address::setAddress(const char*)' at
inaddr.cpp:332:49:
/usr/include/bits/string3.h:85:70: warning: call to void*
__builtin___memset_chk(void*, int, long unsigned int, long unsigned int) will
always overflow destination buffer [enabled by default]
The source code is
memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
You might be better off with
memset((void *)&ipaddr[0], 0, sizeof(*ipaddr));
Regards
David Binderman
_______________________________________________
Bug-commoncpp mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-commoncpp