This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/1334
to look at the new patch set (#2).
stream-client: check read() return value before using it as length input to memcpy
Change-Id: Id962821c71b3a1c4c01c1131eb809b8ec8eaa062
Fixes: Coverity CID 57859
---
M examples/stream-client.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/34/1334/2
diff --git a/examples/stream-client.c b/examples/stream-client.c
index c54db02..b0aea5e 100644
--- a/examples/stream-client.c
+++ b/examples/stream-client.c
@@ -72,8 +72,9 @@
int ret;
ret = read(STDIN_FILENO, buf, sizeof(buf));
-
LOGP(DSTREAMTEST, LOGL_NOTICE, "read %d byte from keyboard\n", ret);
+ if (ret < 0)
+ return ret;
msg = msgb_alloc(1024, "STREAMCLIENT/test");
if (msg == NULL) {
--
To view, visit https://gerrit.osmocom.org/1334
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id962821c71b3a1c4c01c1131eb809b8ec8eaa062
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder