Skip to content

Commit 0f35bc8

Browse files
committed
Set CCM dataSz after buffer is cleared, not before
F-820
1 parent b1c5a11 commit 0f35bc8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7822,8 +7822,8 @@ int WP11_Session_SetCcmParams(WP11_Session* session, int dataSz,
78227822
ret = BAD_FUNC_ARG;
78237823

78247824
if (ret == 0) {
7825-
ccm->dataSz = dataSz;
78267825
XMEMSET(ccm, 0, sizeof(*ccm));
7826+
ccm->dataSz = dataSz;
78277827
XMEMCPY(ccm->iv, iv, ivSz);
78287828
ccm->ivSz = ivSz;
78297829
if (aad != NULL) {

0 commit comments

Comments
 (0)