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:
753be41
)
fix BN_hex2bn()/BN_dec2bn() memory leak
author
huangqinjin
<huangqinjin@gmail.com>
Fri, 6 May 2016 16:50:22 +0000
(
00:50
+0800)
committer
Matt Caswell
<matt@openssl.org>
Fri, 27 May 2016 09:04:26 +0000
(10:04 +0100)
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/bn/bn_print.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_print.c
b/crypto/bn/bn_print.c
index 8d06405ab687caa71f3b537f1ff9e7f58cef9a13..78589dba5bdb3549f92290ee3004774e6dc3fba2 100644
(file)
--- a/
crypto/bn/bn_print.c
+++ b/
crypto/bn/bn_print.c
@@
-139,7
+139,7
@@
int BN_hex2bn(BIGNUM **bn, const char *a)
for (i = 0; i <= (INT_MAX/4) && isxdigit((unsigned char)a[i]); i++)
continue;
- if (i > INT_MAX/4)
+ if (i
== 0 || i
> INT_MAX/4)
goto err;
num = i + neg;
@@
-209,7
+209,7
@@
int BN_dec2bn(BIGNUM **bn, const char *a)
for (i = 0; i <= (INT_MAX/4) && isdigit((unsigned char)a[i]); i++)
continue;
- if (i > INT_MAX/4)
+ if (i
== 0 || i
> INT_MAX/4)
goto err;
num = i + neg;