From bb2d1252e6da6202ebf7015ad9615b31fe993fdc Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 21 Jul 2021 13:28:17 +0200 Subject: [PATCH] Fix final test for invalid base64url chars * src/fns.c (base64_decode_1): Fix test for invalid base64url (bug#45562). Noted by Andreas Schwab. --- src/fns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fns.c b/src/fns.c index a1782166228..7b9e3b0f7fc 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3955,7 +3955,7 @@ base64_decode_1 (const char *from, char *to, ptrdiff_t length, if (c == '=') continue; - if (v1 < 0) + if (v1 == 0) return -1; value += v1 - 1; -- 2.39.2