]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fixing va_start/va_end usage 743/head
authornnposter <[email protected]>
Thu, 9 Aug 2018 21:45:08 +0000 (15:45 -0600)
committerGitHub <[email protected]>
Thu, 9 Aug 2018 21:45:08 +0000 (15:45 -0600)
Per ISO/IEC 9899:201x and POSIX:

As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and vsscanf invoke the va_arg macro, the value of [args] after the return is indeterminate.

What needs to be done instead is to wrap each invocation of pcap*snprintf with its own pair of va_start and va_end.


No differences found