From b4e6cb80521688d11ed79003d891b082ab0978cb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 21 Aug 2013 05:55:13 +0000 Subject: [PATCH] * symbols.c (fb_label_instance_inc, fb_label_instance): Properly range check label number for use with fb_low_counter array. --- gas/ChangeLog | 5 +++++ gas/symbols.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9ee06673bae..d335c919f39 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2013-08-21 Alan Modra + + * 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 * config/tc-mips.c (mips_check_isa_supports_ase, reg_lookup) diff --git a/gas/symbols.c b/gas/symbols.c index 05ae6a71e17..67fc84bb7e3 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -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]); } -- 2.30.2