From: Frank Kotler Date: Wed, 8 Jun 2005 16:41:10 +0000 (+0000) Subject: fix outobj.c bug - every 256th extern crashed nasm X-Git-Tag: nasm-2.11.05~2159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3071da71e0ef3193d35a5afd1cc0c9cc4db5687;p=platform%2Fupstream%2Fnasm.git fix outobj.c bug - every 256th extern crashed nasm - --- diff --git a/CHANGES b/CHANGES index f259068..27d501d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +0.98.40 +* fix (?) bug in outobj.c - every 256th "extern" caused Nasm crash + 0.98.39 ------- * fix buffer overflow diff --git a/output/outobj.c b/output/outobj.c index d1464fc..84a7bcd 100644 --- a/output/outobj.c +++ b/output/outobj.c @@ -1172,7 +1172,7 @@ static void obj_write_fixup(ObjRecord * orp, int bytes, else { long i = seg / 2; struct ExtBack *eb = ebhead; - while (i > EXT_BLKSIZ) { + while (i >= EXT_BLKSIZ) { if (eb) eb = eb->next; else @@ -1231,7 +1231,7 @@ static void obj_write_fixup(ObjRecord * orp, int bytes, else { long i = wrt / 2; struct ExtBack *eb = ebhead; - while (i > EXT_BLKSIZ) { + while (i >= EXT_BLKSIZ) { if (eb) eb = eb->next; else @@ -1766,7 +1766,7 @@ static long obj_segbase(long segment) struct ExtBack *eb = ebhead; struct External *e; - while (i > EXT_BLKSIZ) { + while (i >= EXT_BLKSIZ) { if (eb) eb = eb->next; else