diff options
| author | Lars Ingebrigtsen | 2021-07-21 13:28:17 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-21 13:28:17 +0200 |
| commit | bb2d1252e6da6202ebf7015ad9615b31fe993fdc (patch) | |
| tree | f63ebada2883ff227e5a39a4b987aa2523b75c55 | |
| parent | cdc1fab38d70f33b4b0d8da19d8474fe11f2f3dd (diff) | |
| download | emacs-bb2d1252e6da6202ebf7015ad9615b31fe993fdc.tar.gz emacs-bb2d1252e6da6202ebf7015ad9615b31fe993fdc.zip | |
Fix final test for invalid base64url chars
* src/fns.c (base64_decode_1): Fix test for invalid base64url
(bug#45562). Noted by Andreas Schwab.
| -rw-r--r-- | src/fns.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -3955,7 +3955,7 @@ base64_decode_1 (const char *from, char *to, ptrdiff_t length, | |||
| 3955 | if (c == '=') | 3955 | if (c == '=') |
| 3956 | continue; | 3956 | continue; |
| 3957 | 3957 | ||
| 3958 | if (v1 < 0) | 3958 | if (v1 == 0) |
| 3959 | return -1; | 3959 | return -1; |
| 3960 | value += v1 - 1; | 3960 | value += v1 - 1; |
| 3961 | 3961 | ||