Commit 0daa04a5 authored by Simon Horman's avatar Simon Horman Committed by Greg Kroah-Hartman

Staging: otus: zfTkipInit(): increment another pointer

Increment the pointer rather than its value.
These appear to be logic errors.

Thanks to Dan Carpenter for the first hunk of this change.

Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e36e8c0a
...@@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) ...@@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv)
zfMemoryCopy(pSeed->ta, ta, 6); zfMemoryCopy(pSeed->ta, ta, 6);
zfMemoryCopy(pSeed->tk, key, 16); zfMemoryCopy(pSeed->tk, key, 16);
iv16 = *initIv++; iv16 = *initIv;
initIv++;
iv16 += *initIv<<8; iv16 += *initIv<<8;
initIv++; initIv++;
...@@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) ...@@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv)
for(i=0; i<4; i++) // initiv is little endian for(i=0; i<4; i++) // initiv is little endian
{ {
iv32 += *initIv<<(i*8); iv32 += *initIv<<(i*8);
*initIv++; initIv++;
} }
pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1 pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment