Skip to content

Commit 6a1db27

Browse files
committed
Fix type casting for psk_keySz in MakePSKPreMasterSecret and initialize newSz in PKCS12_ConcatenateContent
1 parent 829fbbc commit 6a1db27

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31011,7 +31011,7 @@ static void MakePSKPreMasterSecret(Arrays* arrays, byte use_psk_key)
3101131011
XMEMSET(pms, 0, sz);
3101231012
pms += sz;
3101331013
}
31014-
c16toa(arrays->psk_keySz, pms);
31014+
c16toa((word16)arrays->psk_keySz, pms);
3101531015
pms += OPAQUE16_LEN;
3101631016
XMEMCPY(pms, arrays->psk_key, arrays->psk_keySz);
3101731017
arrays->preMasterSz = sz + arrays->psk_keySz + OPAQUE16_LEN * 2;

wolfcrypt/src/pkcs12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ static byte* PKCS12_ConcatenateContent(WC_PKCS12* pkcs12,byte* mergedData,
11471147
{
11481148
byte* oldContent;
11491149
word32 oldContentSz;
1150-
word32 newSz;
1150+
word32 newSz = 0;
11511151

11521152
(void)pkcs12;
11531153

0 commit comments

Comments
 (0)