Fix the issues observed in static source code analysis

Resolve the generic issues observed in static source
code analysis

Change-Id: Ia16e4eae5659cff98dd40059331afe2c356fb9b5
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c
index 409364a..70abc3a 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -682,8 +682,8 @@
         for (i=0; i<256; i++)
         {
             tANI_U8 temp;
-
-            j = (tANI_U8)(j + ctx.sbox[i] + seed[k]);
+            if ( k < LIM_SEED_LENGTH )
+                j = (tANI_U8)(j + ctx.sbox[i] + seed[k]);
             temp = ctx.sbox[i];
             ctx.sbox[i] = ctx.sbox[j];
             ctx.sbox[j] = temp;