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:
124055a
)
check bn_new return value
author
mrpre
<mrpre@163.com>
Fri, 28 Aug 2015 08:12:51 +0000
(16:12 +0800)
committer
Rich Salz
<rsalz@openssl.org>
Mon, 31 Aug 2015 20:03:31 +0000
(16:03 -0400)
Slightly modified from the original PR.
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/asn1/x_bignum.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/x_bignum.c
b/crypto/asn1/x_bignum.c
index 66ce000827cbe6e2d7306e08ffb8dcb89c01ad0a..d2666e15daa8fb9220f8b0961a6eec39b229962a 100644
(file)
--- a/
crypto/asn1/x_bignum.c
+++ b/
crypto/asn1/x_bignum.c
@@
-163,8
+163,8
@@
static int bn_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
{
BIGNUM *bn;
- if (
!*pval
)
-
bn_new(pval, it)
;
+ if (
*pval == NULL && !bn_new(pval, it)
)
+
return 0
;
bn = (BIGNUM *)*pval;
if (!BN_bin2bn(cont, len, bn)) {
bn_free(pval, it);