Merge pull request #74 from NickolasLapp/master

Fixing bug in wc_ecc_sig_size not handling error code
This commit is contained in:
toddouska
2015-06-09 08:42:22 -07:00

View File

@ -2705,7 +2705,7 @@ int wc_ecc_size(ecc_key* key)
int wc_ecc_sig_size(ecc_key* key)
{
int sz = wc_ecc_size(key);
if (sz < 0)
if (sz <= 0)
return sz;
return sz * 2 + SIG_HEADER_SZ + 4; /* (4) worst case estimate */