From 9f8862888eda716b8d3fa0e7237f2ddd571c19d3 Mon Sep 17 00:00:00 2001 From: Nickolas Lapp Date: Mon, 8 Jun 2015 14:40:15 -0600 Subject: [PATCH] Fixing bug in wc_ecc_sig_size not handling error code --- wolfcrypt/src/ecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 82b74bf5f..122121260 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -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 */