Merge pull request #7715 from kaleb-himes/C394706

Address coverity issue 394706
This commit is contained in:
JacobBarthelmeh
2024-07-05 14:46:54 -06:00
committed by GitHub

View File

@ -28587,10 +28587,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t srtpkdf_test(void)
return WC_TEST_RET_ENC_NC;
for (i = 0; i < 32; i++) {
word32 kdr = 1U << i;
idx = wc_SRTP_KDF_kdr_to_idx(kdr);
if (idx != i)
return WC_TEST_RET_ENC_NC;
}
/* SRTCP w/ 48-bit IDX, 128-bit key test */
if (i == 0) {
@ -28622,6 +28618,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t srtpkdf_test(void)
if (XMEMCMP(keyS, srtcpKs_48_2, tv[i].ksSz) != 0)
return WC_TEST_RET_ENC_NC;
}
idx = wc_SRTP_KDF_kdr_to_idx(kdr);
if (idx != i)
return WC_TEST_RET_ENC_NC;
}
return 0;
}