Skip to content

Commit

Permalink
Staging: otus: zfTkipInit(): increment another pointer
Browse files Browse the repository at this point in the history
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: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Simon Horman authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent e36e8c0 commit 0daa04a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/otus/80211core/ctkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->tk, key, 16);

iv16 = *initIv++;
iv16 = *initIv;
initIv++;
iv16 += *initIv<<8;
initIv++;

Expand All @@ -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
{
iv32 += *initIv<<(i*8);
*initIv++;
initIv++;
}

pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1
Expand Down

0 comments on commit 0daa04a

Please sign in to comment.