diff options
author | Bodo Möller <bodo@openssl.org> | 1999-06-15 18:07:44 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-06-15 18:07:44 +0000 |
commit | 6c82fda2dd90640098172f7bce63d69c8b6e0adb (patch) | |
tree | e29671b7d6f23f0ea05b56968e810b70ce911bb7 /crypto/bio/bss_bio.c | |
parent | d486601f41049b9a6366820d8c3f5b8bafd83900 (diff) |
Don't try to use zero-byte buffers.
Diffstat (limited to 'crypto/bio/bss_bio.c')
-rw-r--r-- | crypto/bio/bss_bio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index dae8b3b3e2..a1991a7b90 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -280,6 +280,11 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr) BIOerr(BIO_F_BIO_CTRL, BIO_R_IN_USE); ret = 0; } + else if (num == 0) + { + BIOerr(BIO_F_BIO_CTRL, BIO_R_INVALID_ARGUMENT); + ret = 0; + } else { size_t new_size = num; |