diff options
author | Pauli <pauli@openssl.org> | 2021-06-29 07:59:00 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-30 13:55:09 +1000 |
commit | 01fb4bff9bee4b6a652d42ec9f1b677773280450 (patch) | |
tree | dec281d93f4cafec608ba7e9bf5e2704678e0252 /test | |
parent | 10af976962b2383bb3044120a764037361b8bff7 (diff) |
test: fix coverity 1469427 Improper use of negative value (NEGATIVE_RETURNS)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15943)
Diffstat (limited to 'test')
-rw-r--r-- | test/endecoder_legacy_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/endecoder_legacy_test.c b/test/endecoder_legacy_test.c index 121e2de3d4..943cba56e5 100644 --- a/test/endecoder_legacy_test.c +++ b/test/endecoder_legacy_test.c @@ -289,7 +289,8 @@ static int test_membio_str_eq(BIO *bio_provided, BIO *bio_legacy) long len_provided = BIO_get_mem_data(bio_provided, &str_provided); long len_legacy = BIO_get_mem_data(bio_legacy, &str_legacy); - return TEST_long_ge(len_provided, 0) + return TEST_long_ge(len_legacy, 0) + && TEST_long_ge(len_provided, 0) && TEST_strn2_eq(str_provided, len_provided, str_legacy, len_legacy); } |