Skip to content

lib/base64: decode fixes

Josh Law lkml 2 versions Applied

Status from this message: [merged mm-nonmm-stable] lib-base64-fix-copy-pasted-padding-doc-in-base64_decode.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 0 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2lib/base64: validate before writing in decode tail pathlib/base64.c+2 -10 repliesApplied
2/2lib/base64: fix copy-pasted @padding doc in base64_decode()lib/base64.c+1 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] lib/base64: decode fixes

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.

v2: fix bogus Fixes tag in patch 1

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(-)
Signature · 1 line
2.34.1