lkml.org 
[lkml]   [2010]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] tch 5/6 v2] 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: Simon Horman <horms@verge.net.au>

Index: linux-2.6/drivers/staging/otus/80211core/ctkip.c
===================================================================
--- linux-2.6.orig/drivers/staging/otus/80211core/ctkip.c 2010-01-12 11:45:55.000000000 +1100
+++ linux-2.6/drivers/staging/otus/80211core/ctkip.c 2010-01-12 11:46:28.000000000 +1100
@@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, str
zfMemoryCopy(pSeed->ta, ta, 6);
zfMemoryCopy(pSeed->tk, key, 16);

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

@@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, str
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

\
 
 \ /
  Last update: 2010-01-12 01:53    [W:0.063 / U:9.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site