]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use tor_sscanf, not sscanf, in test_crypto.c
authorNick Mathewson <nickm@torproject.org>
Thu, 2 Jun 2016 14:16:15 +0000 (10:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 2 Jun 2016 14:16:15 +0000 (10:16 -0400)
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

index e6b250a677a3934878c58c131c2ad71087e8e0e3..c128333c204d5dee2e95d9b75f1a85e5324a8e21 100644 (file)
@@ -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);