[or-cvs] r18493: {tor} I worry that the CLEAR() macro in eventdns.c is hiding bugs. (tor/trunk/src/or)

nickm at seul.org nickm at seul.org
Wed Feb 11 17:22:39 UTC 2009


Author: nickm
Date: 2009-02-11 12:22:34 -0500 (Wed, 11 Feb 2009)
New Revision: 18493

Modified:
   tor/trunk/src/or/eventdns.c
Log:
I worry that the CLEAR() macro in eventdns.c is hiding bugs.   That is sad, because it was meant to make them more detectable.  Change it to change stuff to garbage rather than to 0.  If no bugs turn up, we can remove it in 0.2.2.x

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2009-02-11 17:22:29 UTC (rev 18492)
+++ tor/trunk/src/or/eventdns.c	2009-02-11 17:22:34 UTC (rev 18493)
@@ -152,7 +152,7 @@
 
 #define CLASS_INET	EVDNS_CLASS_INET
 
-#define CLEAR(x) do { memset((x), 0, sizeof(*(x))); } while(0)
+#define CLEAR(x) do { memset((x), 0xF0, sizeof(*(x))); } while(0)
 
 struct evdns_request {
 	u8 *request; /* the dns packet data */



More information about the tor-commits mailing list