mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
backtrace: Avoid null-dereferencing strchr result
This commit is contained in:
parent
fa9ae4acb7
commit
f0d811b79c
@ -121,6 +121,9 @@ void __iwd_backtrace_print(unsigned int offset)
|
||||
buf[len] = '\0';
|
||||
|
||||
pos = strchr(buf, '\n');
|
||||
if (!pos)
|
||||
continue;
|
||||
|
||||
*pos++ = '\0';
|
||||
|
||||
if (strcmp(buf, "??") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user