maint: basenc: consistently check buffer bounds when encoding
commita46f34bb56d545369a6b1321c2d78ac08b676c06
authorPádraig Brady <P@draigBrady.com>
Tue, 19 Mar 2024 15:55:18 +0000 (19 15:55 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 19 Mar 2024 23:43:53 +0000 (19 23:43 +0000)
tree71439bb88972381c58c7884c57b656b286e83a4b
parentbf73a7602ac57ba3ce677c3a82379566ebc602a8
maint: basenc: consistently check buffer bounds when encoding

* src/basenc.c (base16_encode, base2msbf_encode, base2lsbf_encode):
Ensure we don't overflow the output buffer, whose length is
passed in the OUTLEN parameter.  This issue was flagged by clang
with -Wunused-but-set-parameter.
src/basenc.c