* symbols.c (fb_label_instance_inc, fb_label_instance): Properly
authorAlan Modra <amodra@gmail.com>
Wed, 21 Aug 2013 05:55:13 +0000 (05:55 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 21 Aug 2013 05:55:13 +0000 (05:55 +0000)
range check label number for use with fb_low_counter array.

gas/ChangeLog
gas/symbols.c

index 9ee06673bae76ac56de13cc0b7e337fbd3b6a917..d335c919f39479631fb63f42afaae28c9ab1eed8 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-21  Alan Modra  <amodra@gmail.com>
+
+       * symbols.c (fb_label_instance_inc, fb_label_instance): Properly
+       range check label number for use with fb_low_counter array.
+
 2013-08-19  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * config/tc-mips.c (mips_check_isa_supports_ase, reg_lookup)
index 05ae6a71e17e9797325ea595d079bdfd9b027743..67fc84bb7e3508c0ebc0c9678345dac321cc8f94 100644 (file)
@@ -1749,7 +1749,7 @@ fb_label_instance_inc (long label)
 {
   long *i;
 
-  if (label < FB_LABEL_SPECIAL)
+  if ((unsigned long) label < FB_LABEL_SPECIAL)
     {
       ++fb_low_counter[label];
       return;
@@ -1797,7 +1797,7 @@ fb_label_instance (long label)
 {
   long *i;
 
-  if (label < FB_LABEL_SPECIAL)
+  if ((unsigned long) label < FB_LABEL_SPECIAL)
     {
       return (fb_low_counter[label]);
     }