mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 09:10:04 +01:00
test: fail if fgets() from addr2line returns NULL
Found by Coverity Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2507828f3f
commit
d9f702918c
1 changed files with 4 additions and 1 deletions
|
|
@ -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] == '?')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue