aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-10-31 10:13:45 -0500
committerGitHub <noreply@github.com>2023-10-31 10:13:45 -0500
commit746a153bc1a1bc1433a1246fcf454eeb058b9de1 (patch)
treec8d4969e0a9113af66dba2e464bcb7628613b26b
parent224f303ee54c54d2147f03010385e8cc48e42869 (diff)
downloadrneovim-746a153bc1a1bc1433a1246fcf454eeb058b9de1.tar.gz
rneovim-746a153bc1a1bc1433a1246fcf454eeb058b9de1.tar.bz2
rneovim-746a153bc1a1bc1433a1246fcf454eeb058b9de1.zip
fix(base64): only check padding if leftover index is set (#25854)
-rw-r--r--src/nvim/base64.c2
1 files changed, 1 insertions, 1 deletions
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++) {