Fix final test for invalid base64url chars

* src/fns.c (base64_decode_1): Fix test for invalid base64url
(bug#45562).  Noted by Andreas Schwab.
This commit is contained in:
Lars Ingebrigtsen 2021-07-21 13:28:17 +02:00
parent cdc1fab38d
commit bb2d1252e6

View file

@ -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;