aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/regex.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 673123c..0bda40e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-21 Nick Clifton <nickc@redhat.com>
+
+ PR 66827
+ * regex.c (EXTRACT_NUMBER): Cast sign byte to unsigned before left
+ shifting.
+
2015-11-27 Pedro Alves <palves@redhat.com>
PR other/61321
diff --git a/libiberty/regex.c b/libiberty/regex.c
index 16338cb..9ffc3f4 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