diff --git a/oqsprov/oqs_sig.c b/oqsprov/oqs_sig.c index a46d5e35..edf68b7e 100644 --- a/oqsprov/oqs_sig.c +++ b/oqsprov/oqs_sig.c @@ -443,7 +443,6 @@ static int oqs_sig_sign(void *vpoqs_sigctx, unsigned char *sig, size_t *siglen, CompositeSignature_free(compsig); goto endsign; } - final_tbslen -= 1; final_tbs = OPENSSL_malloc(final_tbslen); composite_prefix_conversion(final_tbs, oid_prefix); memcpy(final_tbs + COMPOSITE_OID_PREFIX_LEN / 2, tbs_hash, @@ -773,7 +772,6 @@ static int oqs_sig_verify(void *vpoqs_sigctx, const unsigned char *sig, CompositeSignature_free(compsig); goto endverify; } - final_tbslen -= 1; final_tbs = OPENSSL_malloc(final_tbslen); composite_prefix_conversion(final_tbs, oid_prefix); memcpy(final_tbs + COMPOSITE_OID_PREFIX_LEN / 2, tbs_hash,