projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc0ff79
)
cc: Fix SEGV when there is no build-id section
author
Sasha Goldshtein
<goldshtn@gmail.com>
Sun, 12 Feb 2017 00:35:14 +0000
(19:35 -0500)
committer
Sasha Goldshtein
<goldshtn@gmail.com>
Sun, 12 Feb 2017 00:35:14 +0000
(19:35 -0500)
src/cc/bcc_elf.c
patch
|
blob
|
history
diff --git
a/src/cc/bcc_elf.c
b/src/cc/bcc_elf.c
index
8a5136f
..
95ff424
100644
(file)
--- a/
src/cc/bcc_elf.c
+++ b/
src/cc/bcc_elf.c
@@
-241,7
+241,7
@@
static int find_debuglink(Elf *e, char **debug_file, unsigned int *crc) {
static int find_buildid(Elf *e, char *buildid) {
Elf_Data *data = get_section_elf_data(e, ".note.gnu.build-id");
- if (data->d_size <= 16 || strcmp((char *)data->d_buf + 12, "GNU"))
+ if (
!data ||
data->d_size <= 16 || strcmp((char *)data->d_buf + 12, "GNU"))
return 0;
char *buf = (char *)data->d_buf + 16;