diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-03-08 07:58:04 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-03-09 11:02:41 +0100 |
commit | b6a06b13a4ea97cdc831926339a23ca48970b19d (patch) | |
tree | db5bc21e7b49f940b344acfd512679fb7c4278f3 /test/http_test.c | |
parent | 3e6a0d57389d7e5e45b06753692873e40dd125e9 (diff) | |
download | openssl-new-b6a06b13a4ea97cdc831926339a23ca48970b19d.tar.gz |
http_test.c: Fix minor Coverity issue CID 1473608
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14460)
Diffstat (limited to 'test/http_test.c')
-rw-r--r-- | test/http_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/http_test.c b/test/http_test.c index ef0a1d4bf0..e59ef63833 100644 --- a/test/http_test.c +++ b/test/http_test.c @@ -142,7 +142,8 @@ static int test_http_url_ok(const char *url, int exp_ssl, const char *exp_host, int exp_num, num, ssl; int res; - TEST_int_eq(sscanf(exp_port, "%d", &exp_num), 1); + if (!TEST_int_eq(sscanf(exp_port, "%d", &exp_num), 1)) + return 0; res = TEST_true(OSSL_HTTP_parse_url(url, &ssl, &user, &host, &port, &num, &path, &query, &frag)) && TEST_str_eq(host, exp_host) |