]> git.ipfire.org Git - thirdparty/openssl.git/commit
fix Coverity 1604662
authorNeil Horman <nhorman@openssl.org>
Thu, 25 Jul 2024 16:24:04 +0000 (12:24 -0400)
committerNeil Horman <nhorman@openssl.org>
Sat, 27 Jul 2024 14:07:35 +0000 (10:07 -0400)
commit4811efe12fd1af9554718ae15996470a5c2ecd70
tree21dcd0d7bb1a077814d0e9927e4276d921a40346
parent32185d513cf8732ee0a85875ac61ee4389a86bbb
fix Coverity 1604662

Coverity flagged an issue in our bio_enc tests in which we failed to
check the return code of BIO_read for an error condition which can lead
to our length computation going backwards.

Just check the error code before adding it to length

Fixes openssl/project#779

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25006)
test/bio_enc_test.c