aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 14:11:16 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 17:10:29 +0100
commitbe67050a360dd196203b63e7320fbc7608dfa400 (patch)
treeed1d4d35ec9d7d9c5f25e6b917153fa993a1e9ce /openbsc/src/libbsc
parent3c165d02bb7f004ffcafdc281c03f45149850cb9 (diff)
abis_nm: ceck fseek() return code in is_last_line()
Change-Id: I8ed4e703625c9da959e0938cd1eb3f0c73a2d4d0 Fixes: Coverity CID 57643
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_nm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index c9b2aac..0c723e8 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -838,7 +838,9 @@ static int is_last_line(FILE *stream)
return 1;
if (!fgets(next_seg_buf, sizeof(next_seg_buf)-2, stream)) {
- fseek(stream, pos, SEEK_SET);
+ int rc = fseek(stream, pos, SEEK_SET);
+ if (rc < 0)
+ return rc;
return 1;
}