httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject [PATCH] broken cfg_getline
Date Fri, 13 Mar 1998 22:53:29 GMT
Right now, if you have a line with no whitespace at all (eg. htpasswd file
with no terminate \r), then cfg_getline will walk off the end of the
source and keep copying.  Bogus.

The below fixes it the quick and easy way; if anyone wants to rework the
thing, go ahead.  Otherwise I will commit this.

This is what is causing windows users with editors that don't terminate
the last line to have problems with htpasswd files.

Index: main/util.c
===================================================================
RCS file: /export/home/cvs//apache-1.3/src/main/util.c,v
retrieving revision 1.98
diff -u -r1.98 util.c
--- util.c	1998/03/09 22:42:59	1.98
+++ util.c	1998/03/13 22:49:55
@@ -813,6 +813,7 @@
 		++src;
 		++dst;
 	    }
+	    if (*src == '\0') continue;
 	    *dst++ = ' ';
 	    while (isspace(*src))
 		++src;


Mime
View raw message