]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: ptx: add a robustness test case
authoroech3 <79379754+oech3@users.noreply.github.com>
Fri, 6 Feb 2026 13:51:24 +0000 (13:51 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 6 Feb 2026 13:51:24 +0000 (13:51 +0000)
* tests/ptx/ptx-overrun.sh: Ensure input is processed without issue.
https://github.com/coreutils/coreutils/pull/184

tests/ptx/ptx-overrun.sh

index e0228d62d93376e29445900562bca2c57d9ba7fb..e8bdc6c7da030bf861e2138373f895634543a4dd 100755 (executable)
@@ -18,6 +18,9 @@
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ptx
 
+# Ensure this input is processed
+printf '%s' '012345678901234567890123456789🛠' | ptx || fail=1
+
 # Trigger a heap-clobbering bug in ptx from coreutils-6.10 and earlier.
 # Using a long file name makes an abort more likely.
 # Even with no file name, valgrind detects the buffer overrun.