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

[or-cvs] r9604: Reverse arguments in memset() call in no-mmap version of tor (in tor/trunk: . src/common)



Author: nickm
Date: 2007-02-20 17:25:20 -0500 (Tue, 20 Feb 2007)
New Revision: 9604

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/common/compat.c
Log:
 r11852@catbus:  nickm | 2007-02-20 17:25:17 -0500
 Reverse arguments in memset() call in no-mmap version of tor_munmap_file().  Resolves bug 392.  Spotted by "fookoowa"--thanks!



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11852] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-20 18:34:18 UTC (rev 9603)
+++ tor/trunk/ChangeLog	2007-02-20 22:25:20 UTC (rev 9604)
@@ -42,6 +42,8 @@
     - Mask out all signals in sub-threads; only the libevent signal handler
       should be processing them. This should prevent some crashes on some
       machines using pthreads. (Patch from coderman.)
+    - Fix switched arguments on memset in the implementation of tor_munmap()
+      for systems with no mmap() call.
 
   o Minor features (controller):
     - Warn the user when an application uses the obsolete binary v0

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-02-20 18:34:18 UTC (rev 9603)
+++ tor/trunk/src/common/compat.c	2007-02-20 22:25:20 UTC (rev 9604)
@@ -280,7 +280,7 @@
 {
   char *d = (char*)handle->data;
   tor_free(d);
-  memset(handle, sizeof(tor_mmap_t), 0);
+  memset(handle, 0, sizeof(tor_mmap_t));
   tor_free(handle);
 }
 #endif