zsh-workers
 help / color / mirror / code / Atom feed
* isearch bugfix
@ 1996-07-28 20:47 Zoltan Hidvegi
  0 siblings, 0 replies; only message in thread
From: Zoltan Hidvegi @ 1996-07-28 20:47 UTC (permalink / raw)
  To: Zsh hacking and development

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);
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-07-28 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-28 20:47 isearch bugfix Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).