From b693f941fdf19e9006c141d5351d707ebbd89522 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Fri, 26 Oct 2001 13:12:25 +0000 Subject: [PATCH] Consistency fix in BUF_MEM_grow: Initialise to zero when new memory had to be allocated, not just when reusing the existing buffer. --- crypto/buffer/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.34.1