PR28694, Out-of-bounds write in stab_xcoff_builtin_type
authorAlan Modra <amodra@gmail.com>
Wed, 15 Dec 2021 01:18:42 +0000 (11:48 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 15 Dec 2021 01:21:26 +0000 (11:51 +1030)
commit161e87d12167b1e36193385485c1f6ce92f74f02
tree361204d128f1a80bb5a8ab7d7849b568e97d0807
parentd5c94731766bf4f276146fd29c1df8eebc2aaf69
PR28694, Out-of-bounds write in stab_xcoff_builtin_type

PR 28694
* stabs.c (stab_xcoff_builtin_type): Make typenum unsigned.
Negate typenum earlier, simplifying bounds checking.  Correct
off-by-one indexing.  Adjust switch cases.
binutils/stabs.c