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

PATCH: Re: Unitialized memory reads again.



Sigh.


Bye
 Sven

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.19
diff -u -r1.19 compmatch.c
--- Src/Zle/compmatch.c	2000/06/13 09:05:37	1.19
+++ Src/Zle/compmatch.c	2000/06/15 09:30:31
@@ -488,7 +488,7 @@
 	 */
 
 	bslash = 0;
-	if (test && !sfx &&
+	if (test && !sfx && lw &&
 	    (l[ind] == w[ind] ||
 	     (bslash = (lw > 1 && w[ind] == '\\' &&
 			(ind ? (w[0] == l[0]) : (w[1] == l[0])))))) {
@@ -803,7 +803,7 @@
 	/* Same code as at the beginning, used in top-level calls. */
 
 	bslash = 0;
-	if ((!test || sfx) &&
+	if ((!test || sfx) && lw &&
 	    (l[ind] == w[ind] ||
 	     (bslash = (lw > 1 && w[ind] == '\\' &&
 			(ind ? (w[0] == l[0]) : (w[1] == l[0])))))) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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