[or-cvs] r14103: Backport to 0.2.0: Detect errors from directory listing corr (in tor/branches/tor-0_2_0-patches: . src/common)

nickm at seul.org nickm at seul.org
Tue Mar 18 16:08:55 UTC 2008


Author: nickm
Date: 2008-03-18 12:08:55 -0400 (Tue, 18 Mar 2008)
New Revision: 14103

Modified:
   tor/branches/tor-0_2_0-patches/
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/common/util.c
Log:
 r18930 at catbus:  nickm | 2008-03-18 12:08:28 -0400
 Backport to 0.2.0: Detect errors from directory listing correctly on win32.  Bug found by lodger.



Property changes on: tor/branches/tor-0_2_0-patches
___________________________________________________________________
 svk:merge ticket from /tor/020 [r18930] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-18 16:08:49 UTC (rev 14102)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-03-18 16:08:55 UTC (rev 14103)
@@ -20,6 +20,8 @@
       at the BIO used (sometimes) to buffer data for the network.
       Looking at different BIOs could result in write counts on the
       order of ULONG_MAX. Fixes bug 614.
+    - On Windows, correctly detect errors when listing the contents of a
+      directory.  Fix from lodger.
 
   o Minor bugfixes (on 0.2.0.x):
     - Downgrade "sslv3 alert handshake failure" message to INFO.

Modified: tor/branches/tor-0_2_0-patches/src/common/util.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/common/util.c	2008-03-18 16:08:49 UTC (rev 14102)
+++ tor/branches/tor-0_2_0-patches/src/common/util.c	2008-03-18 16:08:55 UTC (rev 14103)
@@ -2096,7 +2096,7 @@
   size_t pattern_len = strlen(dirname)+16;
   pattern = tor_malloc(pattern_len);
   tor_snprintf(pattern, pattern_len, "%s\\*", dirname);
-  if (!(handle = FindFirstFile(pattern, &findData))) {
+  if (INVALID_HANDLE_VALUE == (handle = FindFirstFile(pattern, &findData))) {
     tor_free(pattern);
     return NULL;
   }



More information about the tor-commits mailing list