]> git.ipfire.org Git - thirdparty/openssl.git/commit
Avoid NULL pointer dereference
authorRadek Krejci <radek.krejci@oracle.com>
Thu, 21 Mar 2024 12:19:23 +0000 (13:19 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 8 Jul 2024 19:56:19 +0000 (21:56 +0200)
commit188fadc00a35434c4f7dab244af80744c5373222
treea25fc87495961413d32ecb0b697960844c9c392b
parentf6cab2ef9bd90e4769aecf21ee63b24856851f35
Avoid NULL pointer dereference

Function readbuffer_gets() misses some of the initial checks of its
arguments. Not checking them can lead to a later NULL pointer
dereferences.

The checks are now unified with the checks in readbuffer_read()
function.

CLA: trivial
Fixes #23915

Signed-off-by: Radek Krejci <radek.krejci@oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23918)

(cherry picked from commit c215d75f94fcaa598817e739221f33b71b53fb39)
crypto/bio/bf_readbuff.c