bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paul Eggert
Subject: bug#79184: base32/base64: different behavior of -d with invalid input
Date: Wed, 6 Aug 2025 10:17:32 -0700
User-agent: Mozilla Thunderbird

On 2025-08-06 09:04, Daniel Hofstetter wrote:
$ 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 don't see a bug here. Both programs convert as much as they can, and then stop and diagnose a failure if there is one. base32 can't convert anything, so it stops right away. base64 can convert the 'inva' as that's valid base64 input, so it outputs the converted data before finding the "lid\n" which is invalid.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]