]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Fix leb128 reading
authorTom Tromey <tom@tromey.com>
Wed, 28 Oct 2020 23:26:42 +0000 (17:26 -0600)
committerMark Wielaard <mark@klomp.org>
Thu, 29 Oct 2020 22:59:25 +0000 (23:59 +0100)
commit70343f484481184f9fa216071399690ff833256b
treedf8340788f995dfb8b2b892f396e4849ac49ba34
parent56f64c94651f4840e890c1963f9d6f6a4123abde
Fix leb128 reading

PR 26773 points out that some sleb128 values are decoded incorrectly.

This version of the fix only examines the sleb128 conversion.
Overlong encodings are not handled, and the uleb128 decoders are not
touched.  The approach taken here is to do the work in an unsigned
type, and then rely on an implementation-defined cast to convert to
signed.

Signed-off-by: Tom Tromey <tom@tromey.com>
.gitignore
ChangeLog
libdw/ChangeLog
libdw/dwarf_getlocation.c
libdw/memory-access.h
tests/ChangeLog
tests/Makefile.am
tests/leb128.c [new file with mode: 0644]