Openwsman / openwsman

Openwsman server implementation and client api with bindings
BSD 3-Clause "New" or "Revised" License
112 stars 53 forks source link

openwsman: iniparser: fix buffer size #159

Closed ausyskin closed 2 years ago

ausyskin commented 3 years ago

Account for column size in buffer.

Fix gcc warning: openwsman/src/lib/u/iniparser.c: In function ‘iniparser_new’: openwsman/src/lib/u/iniparser.c:503:50: warning: ‘builtin_snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=] 503 | snprintf(longkey, sizeof(longkey), "%s:%s", sec, key); | ^ In file included from /usr/include/stdio.h:867, from openwsman/src/lib/u/iniparser.c:31: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘builtin_snprintf_chk’ output between 2 and 2050 bytes into a destination of size 2049

Signed-off-by: Alexander Usyskin alexander.usyskin@intel.com