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:
parent
1a3f3aa5f0
commit
716cb450aa
@ -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)) |
|
||||
|
Loading…
x
Reference in New Issue
Block a user