diff options
author | Alan Modra <amodra@gmail.com> | 2021-05-10 09:56:43 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-05-10 10:03:00 +0930 |
commit | 2d4b49864eba70606b1bee3d0a3e8414189dcd6d (patch) | |
tree | f3a8c3cd72a12ea0b3181a388beea89de5ac7448 /binutils/ChangeLog | |
parent | 400f0c9b88c68784f9c516422f293bc4d19d9e5b (diff) | |
download | gdb-2d4b49864eba70606b1bee3d0a3e8414189dcd6d.zip gdb-2d4b49864eba70606b1bee3d0a3e8414189dcd6d.tar.gz gdb-2d4b49864eba70606b1bee3d0a3e8414189dcd6d.tar.bz2 |
Avoid possible pointer wrap
PTR supplied to these macros can be read from user input, END is an
end of buffer pointer. It's safer to do arithmetic on END than on PTR.
* dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
END rather than adding amount to PTR.
(SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
Diffstat (limited to 'binutils/ChangeLog')
-rw-r--r-- | binutils/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3026297..ae27252 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2021-05-10 Alan Modra <amodra@gmail.com> + + * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from + END rather than adding amount to PTR. + (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise. + 2021-05-09 Alan Modra <amodra@gmail.com> * objcopy.c (eq_string): Delete. |