Message ID | 87h9jgj6i2.fsf@redhat.com |
---|---|
State | New |
Headers | show |
On Fri, Dec 18, 2015 at 4:17 AM, Nick Clifton <nickc@redhat.com> wrote: > > 2015-12-18 Nick Clifton <nickc@redhat.com> > > PR 66827 > * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left > shifting. This is OK. Thanks. Ian
Index: libiberty/regex.c =================================================================== --- libiberty/regex.c (revision 231805) +++ libiberty/regex.c (working copy) @@ -685,7 +685,7 @@ # define EXTRACT_NUMBER(destination, source) \ do { \ (destination) = *(source) & 0377; \ - (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \ + (destination) += ((unsigned) SIGN_EXTEND_CHAR (*((source) + 1))) << 8; \ } while (0) # endif