mirror of
				https://github.com/netwide-assembler/nasm.git
				synced 2025-10-10 00:25:06 -04:00 
			
		
		
		
	fix outobj.c bug - every 256th extern crashed nasm
-
This commit is contained in:
		
							
								
								
									
										3
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								CHANGES
									
									
									
									
									
								
							| @@ -1,3 +1,6 @@ | |||||||
|  | 0.98.40 | ||||||
|  | * fix (?) bug in outobj.c - every 256th "extern" caused Nasm crash | ||||||
|  |  | ||||||
| 0.98.39 | 0.98.39 | ||||||
| ------- | ------- | ||||||
| * fix buffer overflow | * fix buffer overflow | ||||||
|   | |||||||
| @@ -1172,7 +1172,7 @@ static void obj_write_fixup(ObjRecord * orp, int bytes, | |||||||
|         else { |         else { | ||||||
|             long i = seg / 2; |             long i = seg / 2; | ||||||
|             struct ExtBack *eb = ebhead; |             struct ExtBack *eb = ebhead; | ||||||
|             while (i > EXT_BLKSIZ) { |             while (i >= EXT_BLKSIZ) { | ||||||
|                 if (eb) |                 if (eb) | ||||||
|                     eb = eb->next; |                     eb = eb->next; | ||||||
|                 else |                 else | ||||||
| @@ -1231,7 +1231,7 @@ static void obj_write_fixup(ObjRecord * orp, int bytes, | |||||||
|             else { |             else { | ||||||
|                 long i = wrt / 2; |                 long i = wrt / 2; | ||||||
|                 struct ExtBack *eb = ebhead; |                 struct ExtBack *eb = ebhead; | ||||||
|                 while (i > EXT_BLKSIZ) { |                 while (i >= EXT_BLKSIZ) { | ||||||
|                     if (eb) |                     if (eb) | ||||||
|                         eb = eb->next; |                         eb = eb->next; | ||||||
|                     else |                     else | ||||||
| @@ -1766,7 +1766,7 @@ static long obj_segbase(long segment) | |||||||
|         struct ExtBack *eb = ebhead; |         struct ExtBack *eb = ebhead; | ||||||
|         struct External *e; |         struct External *e; | ||||||
|  |  | ||||||
|         while (i > EXT_BLKSIZ) { |         while (i >= EXT_BLKSIZ) { | ||||||
|             if (eb) |             if (eb) | ||||||
|                 eb = eb->next; |                 eb = eb->next; | ||||||
|             else |             else | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user