[tor-commits] [tor/master] Fix a bogus memwipe length in rend_service_load_auth_keys().

nickm at torproject.org nickm at torproject.org
Wed Sep 14 14:59:13 UTC 2016


commit 425f5e6d40d756dabef4354fec562c6de2c56efd
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Sep 14 10:58:00 2016 -0400

    Fix a bogus memwipe length in rend_service_load_auth_keys().
    
    Bugfix on a4f46ff8ba43b1e635bc5a8543b9354e6de02e14. Found by Coverity.
---
 src/or/rendservice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 4f7d7aa..114a56b 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1490,7 +1490,7 @@ rend_service_load_auth_keys(rend_service_t *s, const char *hfname)
   strmap_free(parsed_clients, rend_authorized_client_strmap_item_free);
 
   if (cfname) {
-    memwipe(cfname, 0, sizeof(cfname));
+    memwipe(cfname, 0, strlen(cfname));
     tor_free(cfname);
   }
 



More information about the tor-commits mailing list