src/log.c: Don't crash when addr2line output contains no newline

This commit is contained in:
root 2016-01-12 19:17:11 +01:00
parent a5d5dd4adf
commit 0b182dc173
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) {