jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36122?usp=email )
Change subject: stream: Initialize outmsg in stream_iofd_sctp_send_msgb() ......................................................................
stream: Initialize outmsg in stream_iofd_sctp_send_msgb()
Uninitialized fields ont outmsg may cause undefined behaviour inside subsequent function calls.
Related: OS#5753 Change-Id: If4c8239c17deceeb56f64ebaff435df1e9d782cd --- M src/stream.c 1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/22/36122/1
diff --git a/src/stream.c b/src/stream.c index 409e3fe..f4755e0 100644 --- a/src/stream.c +++ b/src/stream.c @@ -326,7 +326,7 @@ */ int stream_iofd_sctp_send_msgb(struct osmo_io_fd *iofd, struct msgb *msg, int sendmsg_flags) { - struct msghdr outmsg; + struct msghdr outmsg = {}; char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; struct sctp_sndrcvinfo *sinfo; struct cmsghdr *cmsg;