diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-09-27 17:50:35 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-09-27 17:50:35 +0200 |
commit | 9643ddb13af88c153c150c91ae538ff04808577e (patch) | |
tree | 8b3c9f9fa3da6f33b6d62c0a50aff936ec713dfd /crypto/bio | |
parent | 3c9ffd0273b7e1e1e425be03c5e8a58ef07c4625 (diff) |
dgram_pair_read_inner(): Do not move buf pointer if it is NULL
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19284)
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_dgram_pair.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bio/bss_dgram_pair.c b/crypto/bio/bss_dgram_pair.c index 2b99f794e0..fedcd66dd3 100644 --- a/crypto/bio/bss_dgram_pair.c +++ b/crypto/bio/bss_dgram_pair.c @@ -745,7 +745,8 @@ static size_t dgram_pair_read_inner(struct bio_dgram_pair_st *b, uint8_t *buf, s ring_buf_pop(&b->rbuf, src_len); - buf += src_len; + if (buf != NULL) + buf += src_len; total_read += src_len; sz -= src_len; } |