GNU bug report logs - #79184
base32/base64: different behavior of -d with invalid input

Previous Next

Package: coreutils;

Reported by: Daniel Hofstetter <dhofstet <at> gmail.com>

Date: Wed, 6 Aug 2025 16:05:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Hofstetter <dhofstet <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: base32/base64: different behavior of -d with invalid input
Date: Wed, 6 Aug 2025 18:04:30 +0200
Hi,

I noticed some inconsistency in how base32 and base64 handle invalid
input when decoding.

base32 simply shows an error on stderr whereas base64 shows an error
on stderr plus some output on stdout.

$ echo 'invalid' | base32 -d 2> /dev/null
$ echo 'invalid' | base32 -d > /dev/null
base32: invalid input
$ echo 'invalid' | base64 -d 2> /dev/null
�{ږ'$
$ echo 'invalid' | base64 -d > /dev/null
base64: invalid input

I'm using coreutils 9.7.

Regards,
Daniel




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.