BUG/MINOR: base64: base64urldec() ignores padding in output size check
authorDragan Dosen <ddosen@haproxy.com>
Wed, 25 Aug 2021 09:57:01 +0000 (11:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 25 Aug 2021 14:14:14 +0000 (16:14 +0200)
commit61aa4428c1a0a7b747914da0f7b47bae59f4f755
treed456df8ae8d3acd825de08c428107b794f39977e
parent14c3c5c1216cc8cb7b421135dc44d658a748bc11
BUG/MINOR: base64: base64urldec() ignores padding in output size check

Without this fix, the decode function would proceed even when the output
buffer is not large enough, because the padding was not considered. For
example, it would not fail with the input length of 23 and the output
buffer size of 15, even the actual decoded output size is 17.

This patch should be backported to all stable branches that have a
base64urldec() function available.
src/base64.c