On 7/17/24 16:18, Mike Pattrick wrote: > On Wed, Jul 17, 2024 at 8:01 AM Ilya Maximets <[email protected]> wrote: >> >> GCC 14.1.1 of Fedora 41 thinks that 'i' can be in a full range and >> so 8 bytes is not enough to print it. >> >> lib/match.c: In function 'match_format': >> lib/match.c:1631:45: >> error: '%d' directive output may be truncated writing >> between 1 and 11 bytes into a region of size 8 >> 1631 | snprintf(str_i, sizeof(str_i), "%d", i); >> | ^~ >> lib/match.c:1631:44: >> note: directive argument in the range [-2147483646, 1] >> 1631 | snprintf(str_i, sizeof(str_i), "%d", i); >> | ^~~~ >> lib/match.c:1631:13: >> note: 'snprintf' output between 2 and 12 bytes into >> a destination of size 8 >> 1631 | snprintf(str_i, sizeof(str_i), "%d", i); >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> In practice that value can't be larger than 2, but it's not a >> performance critical code, so let's just increase the size to >> a maximum 12. >> >> Signed-off-by: Ilya Maximets <[email protected]> > > > Acked-by: Mike Pattrick <[email protected]> >
Thanks! Applied and backported down to 2.17. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
