forked from wolfSSL/wolfssl
Fix the possibility that memory is not free'd when GetLength returns 0
This commit is contained in:
@ -1070,7 +1070,7 @@ int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw,
|
||||
ERROR_OUT(ASN_PARSE_E, exit_pk12par);
|
||||
}
|
||||
if ((ret = GetLength(data, &idx, &size, ci->dataSz)) <= 0) {
|
||||
goto exit_pk12par;
|
||||
ERROR_OUT(ASN_PARSE_E, exit_pk12par);
|
||||
}
|
||||
|
||||
if (GetASNTag(data, &idx, &tag, ci->dataSz) < 0) {
|
||||
|
Reference in New Issue
Block a user