diff --git a/tests/Makefile.am b/tests/Makefile.am index 005a936b..51384e64 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,7 +21,7 @@ AM_CPPFLAGS = $(iu_INCLUDES) LDADD = $(iu_LIBRARIES) EXTRA_DIST = tools.sh.in ifconfig_modes.sh crash-tftp-msg2021-12_18.bin \ - crash-ftp-msg2021-12_03.bin + crash-ftp-msg2021-12_03.bin crash-ftp-msg2021-12_16.bin noinst_PROGRAMS = identify identify_LDADD = $(top_builddir)/lib/libgnu.a $(LIBUTIL) $(PTY_LIB) diff --git a/tests/crash-ftp-msg2021-12_16.bin b/tests/crash-ftp-msg2021-12_16.bin new file mode 100644 index 00000000..614536b4 Binary files /dev/null and b/tests/crash-ftp-msg2021-12_16.bin differ diff --git a/tests/ftp-regressions.sh b/tests/ftp-regressions.sh index 1ef61e57..49530ffb 100755 --- a/tests/ftp-regressions.sh +++ b/tests/ftp-regressions.sh @@ -79,6 +79,19 @@ else $silence echo '32 bit integer overflow did not crash ftp.' >&2 fi +# Check regression of crash reported in: +# https://lists.gnu.org/archive/html/bug-inetutils/2021-12/msg00016.html +EFFORTS=`expr $EFFORTS + 1` +$silence echo 'Checking ftp crash bug from message 2021-12/16...' >&2 +"$FTP" < "$srcdir"/crash-ftp-msg2021-12_16.bin >/dev/null 2>&1 +if test $? -ne 0; then + $silence echo 'Regression of ftp crash bug from message 2021-12/16.' >&2 + RESULT=1 +else + SUCCESSES=`expr $SUCCESSES + 1` + $silence echo 'Input from message 2021-12/16 did not crash ftp.' >&2 +fi + # Print test statistics. $silence echo test "$RESULT" -eq 0 && test "$SUCCESSES" -eq "$EFFORTS" && $silence false \