git: 963fdecd1a26 - stable/13 - uudecode: correct error message
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Apr 2022 08:04:25 UTC
The branch stable/13 has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=963fdecd1a26676626a7067965a54ca7d5fa48fb commit 963fdecd1a26676626a7067965a54ca7d5fa48fb Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org> AuthorDate: 2021-11-08 14:31:03 +0000 Commit: Piotr Pawel Stefaniak <pstef@FreeBSD.org> CommitDate: 2022-04-30 08:01:22 +0000 uudecode: correct error message PR: 153276 Reported by: David Brennan (cherry picked from commit 9f3203c003144a4ef6309435036f985afe549ff0) uudecode: add missing test files to Makefile (cherry picked from commit 1b3af110bcd522a077f01350b6a51b3ffe434393) uudecode: use SRCDIR in the regression test (cherry picked from commit f5138631fb6f9dc73d696560caa006f3df714b9a) uudecode: move the new uudecode test from uuencode/ to uudecode/ I don't know how that happened. (cherry picked from commit ae6aa2d43daa6276dd18dc974a1c5b7c15264615) --- usr.bin/uudecode/tests/Makefile | 1 + usr.bin/uudecode/tests/regress.153276.in | 4 ++++ usr.bin/uudecode/tests/regress.153276.out | 1 + usr.bin/uudecode/tests/regress.sh | 5 ++++- usr.bin/uudecode/uudecode.c | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/uudecode/tests/Makefile b/usr.bin/uudecode/tests/Makefile index 6c23c8104413..204f25b18c9e 100644 --- a/usr.bin/uudecode/tests/Makefile +++ b/usr.bin/uudecode/tests/Makefile @@ -8,5 +8,6 @@ ${PACKAGE}FILES+= regress.base64.in ${PACKAGE}FILES+= regress.out ${PACKAGE}FILES+= regress.sh ${PACKAGE}FILES+= regress.traditional.in +${PACKAGE}FILES+= regress.153276.in regress.153276.out .include <bsd.test.mk> diff --git a/usr.bin/uudecode/tests/regress.153276.in b/usr.bin/uudecode/tests/regress.153276.in new file mode 100644 index 000000000000..d881c8a9389e --- /dev/null +++ b/usr.bin/uudecode/tests/regress.153276.in @@ -0,0 +1,4 @@ +begin 644 153276 +/5&AI<R!I<R!A('1E<W0* + +end diff --git a/usr.bin/uudecode/tests/regress.153276.out b/usr.bin/uudecode/tests/regress.153276.out new file mode 100644 index 000000000000..b82ee6f61b39 --- /dev/null +++ b/usr.bin/uudecode/tests/regress.153276.out @@ -0,0 +1 @@ +uudecode: stdin: /dev/null: character out of range: [32-96] diff --git a/usr.bin/uudecode/tests/regress.sh b/usr.bin/uudecode/tests/regress.sh index 3aeb04d2c02e..dca89804bfec 100644 --- a/usr.bin/uudecode/tests/regress.sh +++ b/usr.bin/uudecode/tests/regress.sh @@ -1,10 +1,13 @@ # $FreeBSD$ -echo 1..2 +echo 1..3 REGRESSION_START($1) REGRESSION_TEST_ONE(`uudecode -p <${SRCDIR}/regress.traditional.in', `traditional') REGRESSION_TEST_ONE(`uudecode -p <${SRCDIR}/regress.base64.in', `base64') +# was uudecode: stdin: /dev/null: character out of range: [33-96] +REGRESSION_TEST(`153276', `uudecode -o /dev/null <${SRCDIR}/regress.153276.in 2>&1') + REGRESSION_END() diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index 6d31d96ad958..707ba27df62e 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -353,7 +353,7 @@ uu_decode(void) #define OUT_OF_RANGE do { \ warnx("%s: %s: character out of range: [%d-%d]", \ - infile, outfile, 1 + ' ', 077 + ' ' + 1); \ + infile, outfile, ' ', 077 + ' ' + 1); \ return (1); \ } while (0)