+
+# Bug #47602.
+AT_SETUP([lexer crash due to null byte])
+# Intentionally leave out the new-line and add a null byte:
+printf "datA dist list notable file='input.txt'/a b c.
+lis|.\0" > lexer.sps
+
+AT_CHECK([pspp -O format=csv lexer.sps], [1], [dnl
+lexer.sps:1: error: Unknown command `datA dist'.
+
+lexer.sps:2: error: LIST: LIST is allowed only after the active dataset has been defined.
+
+lexer.sps:2.5: error: LIST: Syntax error at `.': Unexpected `.' in middle of command.
+
+lexer.sps:2.6: error: LIST: Syntax error at `...': Bad character U+0000 in input.
+])
+AT_CLEANUP
+
+
+
+
+# Bug #54684
+AT_SETUP([lexer crash due to overflow])
+printf "DATA LIST/5555555555555555." > lexer.sps
+
+AT_CHECK([pspp -O format=csv lexer.sps], [1], [dnl
+"lexer.sps:1: error: DATA LIST: The record number specified, 5555555555555555, is at or before the previous record, 0. Data fields must be listed in order of increasing record number."
+])
+
+AT_CLEANUP