diff options
author | Richard Levitte <levitte@openssl.org> | 2003-06-11 18:43:45 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-06-11 18:43:45 +0000 |
commit | 606c8048a08d424663ff69045ba3f657a3e38d72 (patch) | |
tree | b0c9b7fbe1a0ff9c622fe0995b724e4f036a558f /crypto/bio | |
parent | e66d863cd0f0b09a375c2fc9bff7bfd1e9c3a2a2 (diff) | |
download | openssl-new-606c8048a08d424663ff69045ba3f657a3e38d72.tar.gz |
Make sure to NUL-terminate the string on end-of-file (and error)
PR: 643
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bf_buff.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c index 1cecd70579..c1fd75aaad 100644 --- a/crypto/bio/bf_buff.c +++ b/crypto/bio/bf_buff.c @@ -494,6 +494,7 @@ static int buffer_gets(BIO *b, char *buf, int size) if (i <= 0) { BIO_copy_next_retry(b); + *buf='\0'; if (i < 0) return((num > 0)?num:i); if (i == 0) return(num); } |