diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-12-14 21:48:23 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2014-12-17 16:35:56 +0100 |
commit | 7a053473c7bedd22e3db39c444a4cd8f97eace25 (patch) | |
tree | f98e9e7def17ec051170aaf663419628d84fae78 /libdw/libdwP.h | |
parent | 9202665816763fad8524dd78a664dbcaa157b8d4 (diff) | |
download | android_external_elfutils-7a053473c7bedd22e3db39c444a4cd8f97eace25.tar.gz android_external_elfutils-7a053473c7bedd22e3db39c444a4cd8f97eace25.tar.bz2 android_external_elfutils-7a053473c7bedd22e3db39c444a4cd8f97eace25.zip |
libdw: Add get_uleb128 and get_sleb128 bounds checking.
Both get_uleb128 and get_sleb128 now take an end pointer to prevent
reading too much data. Adjust all callers to provide the end pointer.
There are still two exceptions. "Raw" dwarf_getabbrevattr and
read_encoded_valued don't have a end pointer associated yet.
They will have to be provided in the future.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libdw/libdwP.h')
-rw-r--r-- | libdw/libdwP.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdw/libdwP.h b/libdw/libdwP.h index eda61a97..5ab72194 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -475,7 +475,7 @@ __libdw_dieabbrev (Dwarf_Die *die, const unsigned char **readp) /* Get the abbreviation code. */ unsigned int code; const unsigned char *addr = die->addr; - get_uleb128 (code, addr); + get_uleb128 (code, addr, die->cu->endp); if (readp != NULL) *readp = addr; |