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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14854
Change subject: osmocon: Add missing check for fstat() return value
......................................................................
osmocon: Add missing check for fstat() return value
Change-Id: Ibef6ee00eb41e16d2ef52931f8c22562090cd1ee
Closes: CID#198570
---
M src/host/osmocon/osmocon.c
1 file changed, 5 insertions(+), 0 deletions(-)
  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/54/14854/1
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 1bb0bb7..61672a3 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -287,6 +287,11 @@
 		}
 
 		rc = fstat(fd, &st);
+		if (rc < 0) {
+			perror("fstat");
+			close(fd);
+			return -EIO;
+		}
 		if ((st.st_size > MAX_DNLOAD_SIZE) && (dnload.mode != MODE_ROMLOAD)) {
 			fprintf(stderr, "The maximum file size is 64kBytes (%u bytes)\n",
 				MAX_DNLOAD_SIZE);
-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/14854
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibef6ee00eb41e16d2ef52931f8c22562090cd1ee
Gerrit-Change-Number: 14854
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/4b7529bd/attachment.htm>