daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34337?usp=email )


Change subject: osmo_io: Init iofd_msghdr to zero
......................................................................

osmo_io: Init iofd_msghdr to zero

Avoid uninitialized read, found with valgrind

Change-Id: I21114ad57784126cfdeb4a932ed44dbf23946fbe
---
M src/core/osmo_io_poll.c
1 file changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/34337/1

diff --git a/src/core/osmo_io_poll.c b/src/core/osmo_io_poll.c
index c230188..5e3be30 100644
--- a/src/core/osmo_io_poll.c
+++ b/src/core/osmo_io_poll.c
@@ -48,7 +48,7 @@
        int rc, flags = 0;

        if (what & OSMO_FD_READ) {
-               struct iofd_msghdr hdr;
+               struct iofd_msghdr hdr = {0};
                msg = iofd_msgb_pending_or_alloc(iofd);
                if (!msg) {
                        LOGPIO(iofd, LOGL_ERROR, "Could not allocate msgb for 
reading\n");

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34337?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I21114ad57784126cfdeb4a932ed44dbf23946fbe
Gerrit-Change-Number: 34337
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to