linux: Check for null value msghdr struct before use
authorKhem Raj <raj.khem@gmail.com>
Fri, 2 Jul 2021 20:28:10 +0000 (13:28 -0700)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 5 Jul 2021 18:11:13 +0000 (15:11 -0300)
commitc8935581de4ff931bc32fb03da5d87f0ee2378a1
tree619b72365133737f7df6c671f10443cc21d35789
parent91fb0f17a5779da6e7877eb74119a83dbe8bf167
linux: Check for null value msghdr struct before use

This avoids crashes in libc when cmsg is null and refrencing msg
structure when it is null

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/convert_scm_timestamps.c
sysdeps/unix/sysv/linux/recvmsg.c