diff options
author | Nick Clifton <nickc@redhat.com> | 2015-02-13 11:13:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-02-13 11:13:20 +0000 |
commit | f641dd969f91a83adf319b269c2411141b0a26a9 (patch) | |
tree | 8c6b66dc41406975ccd9fdf7892749a1b1c9df24 /binutils/coffgrok.c | |
parent | Update Yao Qi's email address in MAINTAINERS (diff) | |
download | binutils-gdb-f641dd969f91a83adf319b269c2411141b0a26a9.tar.gz binutils-gdb-f641dd969f91a83adf319b269c2411141b0a26a9.tar.bz2 binutils-gdb-f641dd969f91a83adf319b269c2411141b0a26a9.zip |
Fix mistake in recent code to check for an unterminated leb128 number.
* dwarf.c (read_leb128): Fix test for shift becoming too large.
Diffstat (limited to 'binutils/coffgrok.c')
-rw-r--r-- | binutils/coffgrok.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/coffgrok.c b/binutils/coffgrok.c index 5dc95580785..2bbfdc45b42 100644 --- a/binutils/coffgrok.c +++ b/binutils/coffgrok.c @@ -668,8 +668,13 @@ do_define (unsigned int i, struct coff_scope *b) if (!is->init) { + long high = s->where->offset + s->type->size; + is->low = s->where->offset; - is->high = s->where->offset + s->type->size; + is->high = high; + /* PR 17512: file: 37e7a80d. */ + if (is->high != high) + fatal (_("Out of range type size: %u"), s->type->size); is->init = 1; is->parent = s->where->section; } |