diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-31 14:36:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-31 20:28:11 +0930 |
commit | 46021a61e42fcda467a7092b03b65095c57f2bc5 (patch) | |
tree | 3191b6b6793b40123363d7d29e3176aac253e831 /gas | |
parent | 7a5dd76f3c0ed63883726e8758856a226551e873 (diff) | |
download | gdb-46021a61e42fcda467a7092b03b65095c57f2bc5.zip gdb-46021a61e42fcda467a7092b03b65095c57f2bc5.tar.gz gdb-46021a61e42fcda467a7092b03b65095c57f2bc5.tar.bz2 |
PR26471 UBSAN: tc-metag.c:7038 left shift cannot be represented
PR 26471
* config/tc-metag.c (md_chars_to_number): Make retval unsigned.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-metag.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 7b6b28d..9b95d51 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2020-08-31 Alan Modra <amodra@gmail.com> + PR 26471 + * config/tc-metag.c (md_chars_to_number): Make retval unsigned. + +2020-08-31 Alan Modra <amodra@gmail.com> + PR 26468 * config/tc-mep.c (md_convert_frag): Use uint32_t for addend and other variables. diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c index 2816640..1e92341 100644 --- a/gas/config/tc-metag.c +++ b/gas/config/tc-metag.c @@ -7030,7 +7030,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp) static unsigned int md_chars_to_number (char *val, int n) { - int retval; + unsigned int retval; unsigned char * where = (unsigned char *) val; for (retval = 0; n--;) |