From 8144fd9e02bd5ccd1e080297b19a1e9eb4d3ff96 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 27 Mar 2021 22:07:15 -0700
Subject: [PATCH] Fix off by one error

Launchpad bug #1501176 reported by William McCall on 2015-09-30

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/cdecode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cdecode.c b/src/cdecode.c
index 4e47e9f..45da4e1 100644
--- a/src/cdecode.c
+++ b/src/cdecode.c
@@ -13,7 +13,7 @@ int base64_decode_value(char value_in)
 	static const char decoding_size = sizeof(decoding);
 	if (value_in < 43) return -1;
 	value_in -= 43;
-	if (value_in > decoding_size) return -1;
+	if (value_in >= decoding_size) return -1;
 	return decoding[(int)value_in];
 }
 
