projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2507828
)
test: fail if fgets() from addr2line returns NULL
author
Peter Hutterer
<peter.hutterer@who-t.net>
Mon, 25 May 2015 07:04:56 +0000
(17:04 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Mon, 25 May 2015 07:30:08 +0000
(17:30 +1000)
Found by Coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c
patch
|
blob
|
history
diff --git
a/test/litest.c
b/test/litest.c
index
037186f
..
7a4938d
100644
(file)
--- a/
test/litest.c
+++ b/
test/litest.c
@@
-99,7
+99,10
@@
litest_backtrace_get_lineno(const char *executable,
}
buffer[0] = '?';
- fgets(buffer, sizeof(buffer), f);
+ if (fgets(buffer, sizeof(buffer), f) == NULL) {
+ pclose(f);
+ return false;
+ }
pclose(f);
if (buffer[0] == '?')