From: nickc Date: Mon, 21 Dec 2015 08:23:35 +0000 (+0000) Subject: PR 66827 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4a217cecbff289a115c86f9ed4a9d71721ccf06;p=thirdparty%2Fgcc.git PR 66827 * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left shifting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231873 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 673123c8e055..0bda40e0682e 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2015-12-21 Nick Clifton + + PR 66827 + * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left + shifting. + 2015-11-27 Pedro Alves PR other/61321 diff --git a/libiberty/regex.c b/libiberty/regex.c index 16338cb206b4..9ffc3f47f006 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -685,7 +685,7 @@ typedef enum # 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