Check the return value

This commit is contained in:
Andras Fekete
2023-08-14 17:02:59 -04:00
parent d3d131d08d
commit b3a1badecf

View File

@ -31698,9 +31698,12 @@ int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, mp_int* s)
} }
if (ret == 0) { if (ret == 0) {
/* Encode DSA signature into buffer. */ /* Encode DSA signature into buffer. */
SetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, out); ret = SetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, out);
/* Set the actual encoding size. */ if ((ret >= 0) && (ret == sz)) {
*outLen = (word32)sz; /* Set the actual encoding size. */
*outLen = (word32)sz;
ret = 0;
}
} }
return ret; return ret;