diff options
Diffstat (limited to 'crypto/buffer')
-rw-r--r-- | crypto/buffer/buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c index b76ff3ad7a..9299baba9e 100644 --- a/crypto/buffer/buffer.c +++ b/crypto/buffer/buffer.c @@ -118,8 +118,9 @@ int BUF_MEM_grow(BUF_MEM *str, int len) else { str->data=ret; - str->length=len; str->max=n; + memset(&str->data[str->length],0,len-str->length); + str->length=len; } return(len); } |