misc: pass NULL instead of 0 for pointer in variadic functions 88/36588/2
authorAndreas Schultz <andreas.schultz@travelping.com>
Fri, 15 May 2020 09:50:07 +0000 (11:50 +0200)
committerIvan Shvedunov <ivan4th@gmail.com>
Tue, 5 Jul 2022 23:32:18 +0000 (03:32 +0400)
commit972dc17634e430cb93b97c67b50096acc3164231
tree2a091bf4b3a16b7c750dda72f268052141ff6dbe
parentf8631ce7e8886136b4543a7926ffdf1bc760fb11
misc: pass NULL instead of 0 for pointer in variadic functions

0 is not NULL (at least not in all cases), passing 0 into a variadic
function in a place where the consumer reads it as pointer might
leave parts of the pointer uninitilized and hence filled with random
data.

It seems that this used to work with gcc, but clang seems to treat the
0 in those places as a 32bit integer.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I37d975eef5a1ad98fbfb65ebe47d73458aafea00
src/plugins/mactime/mactime_top.c
src/vlib/log.c
src/vlib/unix/cli.c
src/vlib/unix/main.c
src/vnet/session/application.c