Merge pull request #6950 from SparkiDev/srtp_kdf_fix

SRTP KDF: Don't use i outside loop
This commit is contained in:
JacobBarthelmeh 2023-11-08 23:13:40 -07:00 committed by GitHub
commit 3332b036d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -910,7 +910,7 @@ static void wc_srtp_kdf_first_block(const byte* salt, word32 saltSz, int kdrIdx,
}
else {
/* XOR in as bit shifted index. */
block[WC_SRTP_MAX_SALT - indexSz] ^= index[i+0] >> bits;
block[WC_SRTP_MAX_SALT - indexSz] ^= index[0] >> bits;
for (i = 1; i < indexSz; i++) {
block[i + WC_SRTP_MAX_SALT - indexSz] ^=
(index[i-1] << (8 - bits)) |