Fix type casting for psk_keySz in MakePSKPreMasterSecret and initialize newSz in PKCS12_ConcatenateContent

This commit is contained in:
Juliusz Sosinowicz
2026-03-25 17:59:18 +01:00
parent 829fbbc702
commit 6a1db27bae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -31011,7 +31011,7 @@ static void MakePSKPreMasterSecret(Arrays* arrays, byte use_psk_key)
XMEMSET(pms, 0, sz);
pms += sz;
}
c16toa(arrays->psk_keySz, pms);
c16toa((word16)arrays->psk_keySz, pms);
pms += OPAQUE16_LEN;
XMEMCPY(pms, arrays->psk_key, arrays->psk_keySz);
arrays->preMasterSz = sz + arrays->psk_keySz + OPAQUE16_LEN * 2;
+1 -1
View File
@@ -1147,7 +1147,7 @@ static byte* PKCS12_ConcatenateContent(WC_PKCS12* pkcs12,byte* mergedData,
{
byte* oldContent;
word32 oldContentSz;
word32 newSz;
word32 newSz = 0;
(void)pkcs12;