]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: base64: return empty string for empty input in base64dec()
authorWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 06:54:15 +0000 (08:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 11:13:24 +0000 (13:13 +0200)
commit997c99df9c7957071d0e63d0c98f2f07ef013580
treeb547c1935707a3b60dde2b78799d2f87af1576f7
parent076655e18d901f158b12c34f1db0994b240ef8b9
BUG/MINOR: base64: return empty string for empty input in base64dec()

Right now no special case is made of size zero and the parser assumes
that it can read the last two chars, which do not exist in this case.
Let's check for this empty string situation and return zero (empty) as
well.

This should be backported to all versions.
src/base64.c