diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-06-06 10:01:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-06-06 10:01:50 -0400 |
commit | 83513a93a15c2e006fcf56d7d97ace5be340b6bc (patch) | |
tree | 448fda98ac85378019f56b57a1ddbd5b0463b15b /src/test/test_crypto.c | |
parent | ed0ecd9f13b69d49a8da8a9025146f6049829548 (diff) | |
download | tor-83513a93a15c2e006fcf56d7d97ace5be340b6bc.tar.gz tor-83513a93a15c2e006fcf56d7d97ace5be340b6bc.zip |
Check tor_sscanf return value in test_crypto.c
Coverity noticed that we check tor_sscanf's return value everywhere
else.
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r-- | src/test/test_crypto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c index c128333c20..d3e12b69b7 100644 --- a/src/test/test_crypto.c +++ b/src/test/test_crypto.c @@ -162,7 +162,8 @@ 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; - tor_sscanf(version, "%d.%d.%d", &a,&b,&c); + int r = tor_sscanf(version, "%d.%d.%d", &a,&b,&c); + tt_int_op(r, OP_EQ, 3); tt_int_op(a, OP_GE, 0); tt_int_op(b, OP_GE, 0); tt_int_op(c, OP_GE, 0); |