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:
2ab42de
)
check buffer is larger enough before overwriting
author
Dr. Stephen Henson
<steve@openssl.org>
Wed, 6 Apr 2011 18:06:54 +0000
(18:06 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 6 Apr 2011 18:06:54 +0000
(18:06 +0000)
crypto/ecdsa/ecdsatest.c
patch
|
blob
|
history
diff --git
a/crypto/ecdsa/ecdsatest.c
b/crypto/ecdsa/ecdsatest.c
index aa4e1481a8f3439427bb237982c72e6e4db533f5..26a4a9ee7c977c86658e2fdc006e3cec40f5a755 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);