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

[or-cvs] r9545: Stop crashing when the controller asks us to resetconf more (in tor/trunk: . src/or)



Author: arma
Date: 2007-02-10 02:04:46 -0500 (Sat, 10 Feb 2007)
New Revision: 9545

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/control.c
Log:
Stop crashing when the controller asks us to resetconf more than
one config option at once. (Vidalia 0.0.11 does this.)
Backport candidate.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-10 03:43:06 UTC (rev 9544)
+++ tor/trunk/ChangeLog	2007-02-10 07:04:46 UTC (rev 9545)
@@ -3,6 +3,10 @@
     - When we start during an accounting interval before it's time to wake
       up, remember to wake up at the correct time. (May fix bug 342.)
 
+  o Major bugfixes (crashes):
+    - Stop crashing when the controller asks us to resetconf more than
+      one config option at once. (Vidalia 0.0.11 does this.)
+
   o Minor bugfixes (controller):
     - Give the controller END_STREAM_REASON_DESTROY events _before_ we
       clear the corresponding on_circuit variable, and remember later that

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-02-10 03:43:06 UTC (rev 9544)
+++ tor/trunk/src/or/control.c	2007-02-10 07:04:46 UTC (rev 9545)
@@ -810,9 +810,9 @@
         ++eq;
       memcpy(outp, body, eq-body);
       outp += (eq-body);
-      *outp++ = ' ';
       body = eq+1;
       if (*eq == '=') {
+        *outp++ = ' ';
         if (*body != '\"') {
           while (!TOR_ISSPACE(*body))
             *outp++ = *body++;