[tor-commits] [tor/master] test: Fix coverity CID 1439131

nickm at torproject.org nickm at torproject.org
Tue Sep 11 16:23:27 UTC 2018


commit 58d74ad943ee3e2d428b17fd08c2de1a093f6a27
Author: David Goulet <dgoulet at torproject.org>
Date:   Mon Sep 10 10:20:58 2018 -0400

    test: Fix coverity CID 1439131
    
    Simple uninitialized object that we could free in an HS v3 unit test.
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 src/test/test_hs_descriptor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 4889281cb..90f2be290 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -675,6 +675,8 @@ test_decode_bad_signature(void *arg)
 
   (void) arg;
 
+  memset(&desc_plaintext, 0, sizeof(desc_plaintext));
+
   /* Update approx time to dodge cert expiration */
   update_approx_time(1502661599);
 





More information about the tor-commits mailing list