bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

commoncpp2-1.7.3 bug report


From: David Binderman
Subject: commoncpp2-1.7.3 bug report
Date: Sun, 11 Dec 2011 10:34:47 +0000


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]