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:
c7c7a8e
)
Fix crash in BUF_MEM_grow_clean.
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Sun, 9 Jul 2017 19:22:26 +0000
(21:22 +0200)
committer
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Mon, 10 Jul 2017 14:25:43 +0000
(16:25 +0200)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3896)
crypto/buffer/buffer.c
patch
|
blob
|
history
diff --git
a/crypto/buffer/buffer.c
b/crypto/buffer/buffer.c
index 6b0bd4a40429f3816aa05118ed3b6c0fda1afff8..ad7128a732a9ac4b7930951e1beeb0a5125a0f77 100644
(file)
--- a/
crypto/buffer/buffer.c
+++ b/
crypto/buffer/buffer.c
@@
-62,9
+62,11
@@
static char *sec_alloc_realloc(BUF_MEM *str, size_t len)
ret = OPENSSL_secure_malloc(len);
if (str->data != NULL) {
- if (ret != NULL)
+ if (ret != NULL)
{
memcpy(ret, str->data, str->length);
- OPENSSL_secure_free(str->data);
+ OPENSSL_secure_free(str->data);
+ str->data = NULL;
+ }
}
return (ret);
}