mirror of
https://github.com/dgibson/dtc.git
synced 2026-01-22 01:30:34 -05:00
In flat tree reading, check for (negative) string offsets which underrun
the input blob. (Patch from Michael Ellerman).
This commit is contained in:
parent
7f6d12b3a1
commit
4ddf7c020c
1 changed files with 1 additions and 1 deletions
|
|
@ -547,7 +547,7 @@ static char *flat_read_stringtable(struct inbuf *inb, int offset)
|
|||
|
||||
p = inb->base + offset;
|
||||
while (1) {
|
||||
if (p >= inb->limit)
|
||||
if (p >= inb->limit || p < inb->base)
|
||||
die("String offset %d overruns string table\n",
|
||||
offset);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue