Fix ots sig length check in LMS validate function
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/library/lms.c b/library/lms.c
index a841179..1e0f319 100644
--- a/library/lms.c
+++ b/library/lms.c
@@ -733,7 +733,7 @@
ret = mbedtls_lmots_sign( &ctx->ots_private_keys[q_leaf_identifier],
f_rng, p_rng, msg, msg_size,
sig + SIG_OTS_SIG_OFFSET,
- MBEDTLS_LMS_SIG_LEN(ctx->params.type, ctx->params.otstype),
+ MBEDTLS_LMS_SIG_LEN(ctx->params.type, ctx->params.otstype) - SIG_OTS_SIG_OFFSET,
NULL );
if( ret != 0 )
{