projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c602e7f
)
Consistency fix in BUF_MEM_grow: Initialise to zero when new memory
author
Bodo Möller
<bodo@openssl.org>
Fri, 26 Oct 2001 13:12:25 +0000
(13:12 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 26 Oct 2001 13:12:25 +0000
(13:12 +0000)
had to be allocated, not just when reusing the existing buffer.
crypto/buffer/buffer.c
patch
|
blob
|
history
diff --git
a/crypto/buffer/buffer.c
b/crypto/buffer/buffer.c
index b76ff3ad7acf24302a039e246455c34561fecfc7..9299baba9e2d5de688fca19cfd889da68c012ef8 100644
(file)
--- 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);
}