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:
7116a41
)
check buffer is larger enough before overwriting
author
Dr. Stephen Henson
<steve@openssl.org>
Wed, 6 Apr 2011 18:07:12 +0000
(18:07 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 6 Apr 2011 18:07:12 +0000
(18:07 +0000)
crypto/ecdsa/ecdsatest.c
patch
|
blob
|
history
diff --git
a/crypto/ecdsa/ecdsatest.c
b/crypto/ecdsa/ecdsatest.c
index b07e31252b9b39971f126f05f254db4a127c952d..90de68c851a49259b4042949c15abd7955715901 100644
(file)
--- a/
crypto/ecdsa/ecdsatest.c
+++ b/
crypto/ecdsa/ecdsatest.c
@@
-168,10
+168,9
@@
int fbytes(unsigned char *buf, int num)
return 0;
}
fbytes_counter ++;
- ret = BN_bn2bin(tmp, buf);
- if (ret == 0 || ret != num)
+ if (num != BN_num_bytes(tmp) || !BN_bn2bin(tmp, buf))
ret = 0;
- else
+ else
ret = 1;
if (tmp)
BN_free(tmp);