Consistency fix in BUF_MEM_grow: Initialise to zero when new memory
had to be allocated, not just when reusing the existing buffer.
This commit is contained in:
parent
c602e7f4e8
commit
b693f941fd
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user