diff --git a/src/log.c b/src/log.c index 6331b0df..42a2ec17 100644 --- a/src/log.c +++ b/src/log.c @@ -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) {