mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
SRTP KDF: Don't use i outside loop
When shifting index down, first XOR outside loop isn't meant to use i.
This commit is contained in:
@@ -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)) |
|
||||
|
Reference in New Issue
Block a user