summaryrefslogtreecommitdiff
path: root/libebl/eblobjnote.c
diff options
context:
space:
mode:
Diffstat (limited to 'libebl/eblobjnote.c')
-rw-r--r--libebl/eblobjnote.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
index c19ea37f..9094715c 100644
--- a/libebl/eblobjnote.c
+++ b/libebl/eblobjnote.c
@@ -350,6 +350,13 @@ ebl_object_note (Ebl *ebl, uint32_t namesz, const char *name, uint32_t type,
desc += 8;
descsz -= 8;
+ if (prop.pr_datasz > descsz)
+ {
+ printf ("BAD property datasz: %" PRId32 "\n",
+ prop.pr_datasz);
+ return;
+ }
+
int elfclass = gelf_getclass (ebl->elf);
char *elfident = elf_getident (ebl->elf, NULL);
GElf_Ehdr ehdr;