Blob Blame Raw
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.12-85) unstable; urgency=medium
 .
   * Version_2_6_13pre81
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-03-28

--- gcl-2.6.12.orig/o/alloc.c
+++ gcl-2.6.12/o/alloc.c
@@ -349,9 +349,10 @@ resize_hole(ufixnum hp,enum type tp,bool
   char *start=rb_begin(),*new_start=heap_end+hp*PAGESIZE;
   ufixnum size=rb_pointer-start;
 
+#define OVERLAP(c_,t_,s_) ((t_)<(c_)+(s_) && (c_)<(t_)+(s_))
   if (!in_placep && (rb_high() ?
-		     new_start+size>rb_end :
-		     new_start+(nrbpage<<PAGEWIDTH)<start+size
+		     OVERLAP(start,new_start,size) :
+		     OVERLAP(start,new_start+(nrbpage<<PAGEWIDTH),size)
 		     /* 0 (20190401  never reached)*/
 		     )) {
     if (sSAnotify_gbcA->s.s_dbind != Cnil)