Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

isearch bugfix



There is a bug in isearch which rarely causes a SEGV.  The problem is that
zsfree() is used on a non-null-terminated string.  Below is a unified
context diff (sometimes I find it more readable than normal context diffs).

Zoltan


--- zle_hist.c	1996/07/28 19:50:55	2.22
+++ zle_hist.c	1996/07/28 20:03:15
@@ -862,7 +862,7 @@
     }
   brk:
     if (sbptr) {
-	zsfree(previous_search);
+	zfree(previous_search, previous_search_len);
 	previous_search = zalloc(sbptr);
 	memcpy(previous_search, sbuf, previous_search_len = sbptr);
     }



Messages sorted by: Reverse Date, Date, Thread, Author