From: Josh Law <objecting@objecting.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Josh Law <objecting@objecting.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] lib/base64: decode fixes
Date: Tue, 24 Mar 2026 22:24:37 +0000 [thread overview]
Message-ID: <20260324222439.46028-1-objecting@objecting.org> (raw)
Two small fixes for lib/base64.c:
1. base64_decode() writes a decoded byte to the output buffer before
validating the input in the trailing-bytes path. Move the validity
checks before any writes so dst is untouched on invalid input.
2. The @padding kernel-doc for base64_decode() was copy-pasted from
base64_encode() and describes the wrong direction.
Josh Law (2):
lib/base64: validate before writing in decode tail path
lib/base64: fix copy-pasted @padding doc in base64_decode()
lib/base64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.34.1
next reply other threads:[~2026-03-24 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 22:24 Josh Law [this message]
2026-03-24 22:24 ` [PATCH 1/2] lib/base64: validate before writing in decode tail path Josh Law
2026-03-24 22:24 ` [PATCH 2/2] lib/base64: fix copy-pasted @padding doc in base64_decode() Josh Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260324222439.46028-1-objecting@objecting.org \
--to=objecting@objecting.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox