log: Don't crash when addr2line output contains no newline

This commit is contained in:
Harald Welte 2016-04-16 11:28:22 -04:00 committed by Denis Kenzior
parent eb23a88956
commit bafe8f2d83
1 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,8 @@ static void print_backtrace(unsigned int offset)
buf[len] = '\0';
pos = strchr(buf, '\n');
if (!pos)
break;
*pos++ = '\0';
if (strcmp(buf, "??") == 0) {