mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-28 02:14:40 +00:00
Reported by Tobias Stoeckmann in: http://bugs.gnu.org/18857 * src/diff.c (main): Don't overflow if INTMAX_MAX / 2 < tabsize. * tests/bignum: New file, to test for this bug. * tests/Makefile.am (TESTS): Add it.
15 lines
258 B
Bash
Executable File
15 lines
258 B
Bash
Executable File
#!/bin/sh
|
|
# big numbers
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
|
|
fail=0
|
|
|
|
for tabsize in 2147483648 9223372036854775808; do
|
|
diff --tabsize=$tabsize /dev/null /dev/null
|
|
status=$?
|
|
test $status -eq 0 || test $status -eq 2 || fail=1
|
|
done
|
|
|
|
Exit $fail
|