mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 12:20:52 +02:00
fix issue where ToTraditional_ex may assign negative value to *pkeySz
This commit is contained in:
@@ -1562,8 +1562,13 @@ int wc_PKCS12_parse_ex(WC_PKCS12* pkcs12, const char* psw,
|
||||
*pkeySz = (word32)size;
|
||||
}
|
||||
else {
|
||||
*pkeySz = (word32)ToTraditional_ex(*pkey,
|
||||
(word32)size, &algId);
|
||||
ret = ToTraditional_ex(*pkey,
|
||||
(word32)size, &algId);
|
||||
if (ret < 0) {
|
||||
*pkeySz = (word32)size;
|
||||
goto exit_pk12par;
|
||||
}
|
||||
*pkeySz = (word32)ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user