diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2021-07-31 15:00:51 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2021-07-31 15:29:09 +0100 |
commit | 05068a794ad98c040c5556b5ec574b0b1cf482a6 (patch) | |
tree | f35631121cc6cee50c076538005ba8ca40ce4833 /build_matrix.sh | |
parent | da92a40752d78996d0108b1bd69c88290dfa258a (diff) |
Address two truncation warnings in pcap_open_live().
These warnings have been around for a while in the REMOTE=yes space of
all Linux builds and OpenBSD/AMD64 build. Pass each of the offending
strings through a tailored buffer to satisfy GCC.
./pcap.c: In function 'pcap_open_live':
./pcap.c:2858:47: warning: '%.*s' directive output may be truncated
writing up to 250 bytes into a region of size between 249 and 252
[-Wformat-truncation=]
2858 | snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %s (%.*s)", device,
| ^~~~
In file included from /usr/include/stdio.h:867,
from ./pcap.c:56:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note:
'__builtin___snprintf_chk' output 6 or more bytes (assuming 259) into a
destination of size 256
./pcap.c:2853:43: warning: '%.*s' directive output may be truncated
writing up to 253 bytes into a region of size between 251 and 254
[-Wformat-truncation=]
2853 | snprintf(errbuf, PCAP_ERRBUF_SIZE, "%s: %.*s", device,
| ^~~~
In file included from /usr/include/stdio.h:867,
from ./pcap.c:56:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note:
'__builtin___snprintf_chk' output 3 or more bytes (assuming 259) into a
destination of size 256
Diffstat (limited to 'build_matrix.sh')
0 files changed, 0 insertions, 0 deletions