[tor-commits] [tor/master] Use tor_sscanf, not sscanf, in test_crypto.c

nickm at torproject.org nickm at torproject.org
Thu Jun 2 14:17:37 UTC 2016


commit ed0ecd9f13b69d49a8da8a9025146f6049829548
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Jun 2 10:16:15 2016 -0400

    Use tor_sscanf, not sscanf, in test_crypto.c
    
    Fixes the 0.2.9 instance of bug #19213, which prevented mingw64 from
    working.  This case wasn't in any released Tor.
---
 src/test/test_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index e6b250a..c128333 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -162,7 +162,7 @@ test_crypto_openssl_version(void *arg)
   tt_assert(!strcmpstart(version, h_version)); /* "-fips" suffix, etc */
   tt_assert(!strstr(version, "OpenSSL"));
   int a=-1,b=-1,c=-1;
-  sscanf(version, "%d.%d.%d", &a,&b,&c);
+  tor_sscanf(version, "%d.%d.%d", &a,&b,&c);
   tt_int_op(a, OP_GE, 0);
   tt_int_op(b, OP_GE, 0);
   tt_int_op(c, OP_GE, 0);



More information about the tor-commits mailing list