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 620675541de8c627cdeff78a624fd63c1a41f085..3a3f7a8d939e3c9c911dabd0010f1eb18a13cb26 100644 (file)
@@ -162,7 +162,7 @@ static OCB_BLOCK *ocb_lookup_l(OCB128_CONTEXT *ctx, size_t idx)
         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++;
     }