modes/ocb128.c: fix overstep.
authorAndy Polyakov <appro@openssl.org>
Wed, 2 Dec 2015 13:26:03 +0000 (14:26 +0100)
committerAndy Polyakov <appro@openssl.org>
Thu, 10 Dec 2015 11:36:25 +0000 (12:36 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/modes/ocb128.c

index 6206755..3a3f7a8 100644 (file)
@@ -162,7 +162,7 @@ static OCB_BLOCK *ocb_lookup_l(OCB128_CONTEXT *ctx, size_t idx)
         if (!ctx->l)
             return NULL;
     }
         if (!ctx->l)
             return NULL;
     }
-    while (l_index <= idx) {
+    while (l_index < idx) {
         ocb_double(ctx->l + l_index, ctx->l + l_index + 1);
         l_index++;
     }
         ocb_double(ctx->l + l_index, ctx->l + l_index + 1);
         l_index++;
     }