[tor-commits] [tor/master] Make a cast less const-violating; make a field size explicit.

nickm at torproject.org nickm at torproject.org
Mon May 7 15:12:57 UTC 2012


commit f84f75c59c6b06fbef41f0f0641b604cf3192eeb
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon May 7 11:09:02 2012 -0400

    Make a cast less const-violating; make a field size explicit.
---
 src/or/rendmid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index 391eab7..894bbb3 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -293,7 +293,7 @@ rend_mid_rendezvous(or_circuit_t *circ, const uint8_t *request,
     goto err;
   }
 
-  base16_encode(hexid, 9, (char*)request, 4);
+  base16_encode(hexid, sizeof(hexid), (const char*)request, 4);
 
   log_info(LD_REND,
            "Got request for rendezvous from circuit %d to cookie %s.",





More information about the tor-commits mailing list