[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] we"ve been stomping on memory while reading config



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common

Modified Files:
	util.c 
Log Message:
we've been stomping on memory while reading config
doesn't seem to have bitten us yet, but let's fix that :)


Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- util.c	18 Oct 2003 00:07:58 -0000	1.31
+++ util.c	18 Oct 2003 01:28:39 -0000	1.32
@@ -481,7 +481,7 @@
   do {
     *s = 0;
     s--;
-  } while (isspace(*s));
+  } while (s >= line && isspace(*s));
 
   key = line;
   while(isspace(*key))