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:
9370c84
)
don't memset(data,0,...) if data is NULL
author
Bodo Möller
<bodo@openssl.org>
Thu, 29 Aug 2002 11:33:43 +0000
(11:33 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 29 Aug 2002 11:33:43 +0000
(11:33 +0000)
Submitted by: anonymous
PR: 254
crypto/pem/pem_lib.c
patch
|
blob
|
history
diff --git
a/crypto/pem/pem_lib.c
b/crypto/pem/pem_lib.c
index 01759f75c3b548135055602b777ec57dd3b6bc21..043b578e22d9ab8e90d6c05e2e7387a897cdf1c2 100644
(file)
--- a/
crypto/pem/pem_lib.c
+++ b/
crypto/pem/pem_lib.c
@@
-405,8
+405,11
@@
err:
memset(iv,0,sizeof(iv));
memset((char *)&ctx,0,sizeof(ctx));
memset(buf,0,PEM_BUFSIZE);
- memset(data,0,(unsigned int)dsize);
- OPENSSL_free(data);
+ if (data != NULL)
+ {
+ memset(data,0,(unsigned int)dsize);
+ OPENSSL_free(data);
+ }
return(ret);
}