summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Kotler <fbkotler@users.sourceforge.net>2005-06-08 16:41:10 +0000
committerFrank Kotler <fbkotler@users.sourceforge.net>2005-06-08 16:41:10 +0000
commitf3071da71e0ef3193d35a5afd1cc0c9cc4db5687 (patch)
tree7b1ffdd0f3a82e16258f5a194d18f50830e1ea29
parent02f05cebbade344d0f84c42fde59c30582997b3a (diff)
downloadnasm-f3071da71e0ef3193d35a5afd1cc0c9cc4db5687.tar.gz
fix outobj.c bug - every 256th extern crashed nasm
-
-rw-r--r--CHANGES3
-rw-r--r--output/outobj.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index f2590681..27d501d0 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 d1464fc0..84a7bcd5 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