diff options
| author | Assaf Gordon <assafgordon@gmail.com> | 2021-08-16 15:03:36 -0600 |
|---|---|---|
| committer | Assaf Gordon <assafgordon@gmail.com> | 2021-08-29 22:06:32 -0600 |
| commit | 709d1f8253072804cc27189a6f2b873d8d563399 (patch) | |
| tree | 9970648147a1fca9954669c2a83c25fb7fc029c5 /scripts/git-hooks/commit-msg | |
| parent | basenc: prefer signed to unsigned integers (diff) | |
| download | coreutils-709d1f8253072804cc27189a6f2b873d8d563399.tar.gz coreutils-709d1f8253072804cc27189a6f2b873d8d563399.zip | |
basenc: fix bug49741: using wrong decoding buffer length
Emil Lundberg <lundberg.emil@gmail.com> reports in
https://bugs.gnu.org/49741 about a 'basenc --base64 -d' decoding bug.
The input buffer length was not divisible by 3, resulting in
decoding errors.
* NEWS: Mention fix.
* src/basenc.c (DEC_BLOCKSIZE): Change from 1024*5 to 4200 (35*3*5*8)
which is divisible by 3,4,5,8 - satisfying both base32 and base64;
Use compile-time verify() macro to enforce the above.
* tests/misc/basenc.pl: Add test.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
