-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Compiling the latest release (2.8.1) with a recent gcc results in the following compile error:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -O2 -fPIC -m64 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wunused -Werror -DPACKAGE_PLUGIN_DIR=\"/usr/lib64/openwsman/plugins\" -I../.. -I../../include -I/usr/include/libxml2 -O2 -fPIC -m64 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wunused -Werror -MT wsman-soap.lo -MD -MP -MF .deps/wsman-soap.Tpo -c wsman-soap.c -fPIC -DPIC -o .libs/wsman-soap.o
In function 'create_subs_info',
inlined from 'wse_subscribe_stub' at wsman-soap.c:1864:8:
wsman-soap.c:1812:17: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
1812 | strncpy(subsInfo->subsId, ntext, EUIDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
This says the destination might not be null-terminated if the source is EUIDLEN bytes long. If null-termination is guaranteed through some other means, then the warning should be disabled.
Metadata
Metadata
Assignees
Labels
No labels