fix outobj.c bug - every 256th extern crashed nasm

-
This commit is contained in:
Frank Kotler 2005-06-08 16:41:10 +00:00
parent 02f05cebba
commit f3071da71e
2 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,6 @@
0.98.40
* fix (?) bug in outobj.c - every 256th "extern" caused Nasm crash
0.98.39
-------
* fix buffer overflow

View file

@ -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