File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -696,8 +696,10 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
696
696
goto crash ;
697
697
// Does the size match a known pool?
698
698
pool_num = FIND_POOL (SERIES_TOTAL (series ));
699
- // Just to be sure the pool matches the allocation:
700
- if (pool_num < SERIES_POOL && Mem_Pools [pool_num ].wide != SERIES_TOTAL (series ))
699
+ // Just to be sure the pool size is enough to hold total series length
700
+ // Originaly it was expecting exact size match, but there may be cases
701
+ // where series' total size may be lower than pool wide.
702
+ if (pool_num < SERIES_POOL && Mem_Pools [pool_num ].wide < SERIES_TOTAL (series ))
701
703
goto crash ;
702
704
}
703
705
series ++ ;
@@ -715,7 +717,8 @@ const REBPOOLSPEC Mem_Pool_Spec[MAX_POOLS] =
715
717
for (seg = Mem_Pools [pool_num ].segs ; seg ; seg = seg -> next ) {
716
718
if ((REBUPT )node > (REBUPT )seg && (REBUPT )node < (REBUPT )seg + (REBUPT )seg -> size ) break ;
717
719
}
718
- if (!seg ) goto crash ;
720
+ if (!seg )
721
+ goto crash ;
719
722
//pnode = node; // for debugger
720
723
}
721
724
// The number of free nodes must agree with header:
You can’t perform that action at this time.
0 commit comments