From: Lars Ingebrigtsen Date: Wed, 21 Jul 2021 11:28:17 +0000 (+0200) Subject: Fix final test for invalid base64url chars X-Git-Tag: emacs-28.0.90~1770 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb2d1252e6da6202ebf7015ad9615b31fe993fdc;p=emacs.git Fix final test for invalid base64url chars * src/fns.c (base64_decode_1): Fix test for invalid base64url (bug#45562). Noted by Andreas Schwab. --- 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;