From 746a153bc1a1bc1433a1246fcf454eeb058b9de1 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:13:45 -0500 Subject: [PATCH] fix(base64): only check padding if leftover index is set (#25854) --- src/nvim/base64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/base64.c b/src/nvim/base64.c index 95aa491281..c647019fb1 100644 --- a/src/nvim/base64.c +++ b/src/nvim/base64.c @@ -180,7 +180,7 @@ char *base64_decode(const char *src, size_t src_len) goto invalid; } - if (leftover_i >= -1) { + if (leftover_i > -1) { int padding_len = acc_len / 2; int padding_chars = 0; for (; (size_t)leftover_i < src_len; leftover_i++) {