[dovecot-cvs] dovecot/src/lib strfuncs.c,1.51,1.52

cras at dovecot.org cras at dovecot.org
Sun Jan 1 21:37:58 EET 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv16651

Modified Files:
	strfuncs.c 
Log Message:
Fix for last change in *_strsplit_spaces().



Index: strfuncs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/strfuncs.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- strfuncs.c	30 Dec 2005 20:06:10 -0000	1.51
+++ strfuncs.c	1 Jan 2006 19:37:56 -0000	1.52
@@ -506,7 +506,7 @@
 
 	if (spaces) {
 		/* skip leading separators */
-		while (strchr(separators, *data) != NULL)
+		while (*data != '\0' && strchr(separators, *data) != NULL)
 			data++;
 	}
 	if (*data == '\0')
@@ -532,7 +532,8 @@
 
 			*str = '\0';
 			if (spaces) {
-				while (strchr(separators, str[1]) != NULL)
+				while (str[1] != '\0' &&
+				       strchr(separators, str[1]) != NULL)
 					str++;
 
 				/* ignore trailing separators */



More information about the dovecot-cvs mailing list