commit | 70343f484481184f9fa216071399690ff833256b | [log] [tgz] |
---|---|---|
author | Tom Tromey <tom@tromey.com> | Wed Oct 28 17:26:42 2020 -0600 |
committer | Mark Wielaard <mark@klomp.org> | Thu Oct 29 23:59:25 2020 +0100 |
tree | df8340788f995dfb8b2b892f396e4849ac49ba34 | |
parent | 56f64c94651f4840e890c1963f9d6f6a4123abde [diff] |
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>