3
0
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:
Denis Kenzior 2021-02-09 10:30:48 -06:00
parent fa9ae4acb7
commit f0d811b79c

View File

@ -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) {