Skip to content

Commit 40492c8

Browse files
authored
fix:#148 (#154)
1 parent fe8603f commit 40492c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/kallsym.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ static int find_linux_banner(kallsym_t *info, char *img, int32_t imglen)
6363
info->linux_banner_offset[info->banner_num++] = (int32_t)(banner - img);
6464
tools_logi("linux_banner %d: %s", info->banner_num, banner);
6565
tools_logi("linux_banner offset: 0x%lx\n", banner - img);
66+
break;
6667
}
6768
}
69+
if(info->banner_num<=0) {
70+
tools_loge("find linux_banner error\n");
71+
return -1;
72+
}
6873
banner = img + info->linux_banner_offset[info->banner_num - 1];
6974

7075
char *uts_release_start = banner + prefix_len;

0 commit comments

Comments
 (0)