Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > b335ff519454bc96ce131f483cb7d518 > files > 6

sash-3.7-8mdv2009.1.src.rpm

--- sash-3.4/utils.c.segf	2004-03-26 21:32:26.000000000 +0100
+++ sash-3.4/utils.c	2004-03-26 21:32:34.000000000 +0100
@@ -588,8 +588,7 @@
 					if (*text == ch)
 						found = TRUE;
 				}
-
-				if (!found)
+				if (!found && retryPat != NULL)
 				{
 					pattern = retryPat;
 					text = ++retryText;
@@ -598,7 +597,7 @@
 				/* fall into next case */
 
 			case '?':  
-				if (*text++ == '\0')
+				if (*text && *text++ == '\0')
 					return FALSE;
 
 				break;