From: Ben Pfaff Date: Sun, 6 Jul 2025 20:00:31 +0000 (-0700) Subject: more test X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b6629ff4197e737c8235ced60e4e554aea149f5;p=pspp more test --- diff --git a/rust/pspp/src/sys/test.rs b/rust/pspp/src/sys/test.rs index 255a30539a..075c0384ec 100644 --- a/rust/pspp/src/sys/test.rs +++ b/rust/pspp/src/sys/test.rs @@ -507,9 +507,14 @@ fn integer_overflows_in_long_string_missing_values() { test_raw_sysfile("integer_overflows_in_long_string_missing_values"); } +/// CVE-2017-10792. +/// See also https://bugzilla.redhat.com/show_bug.cgi?id=1467005. +/// See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890. +/// See also https://security-tracker.debian.org/tracker/CVE-2017-10792. +/// Reported by team OWL337, with fuzzer collAFL. #[test] fn null_dereference_skipping_bad_extension_record_18() { - test_sack_sysfile("null_dereference_skipping_bad_extension_record_18"); + test_raw_sysfile("null_dereference_skipping_bad_extension_record_18"); } /// Duplicate variable name handling negative test. diff --git a/rust/pspp/src/sys/testdata/invalid_variable_name.expected b/rust/pspp/src/sys/testdata/invalid_variable_name.expected index 49475a8d64..9ac792f6ba 100644 --- a/rust/pspp/src/sys/testdata/invalid_variable_name.expected +++ b/rust/pspp/src/sys/testdata/invalid_variable_name.expected @@ -1,8 +1,8 @@ -"$UM1" may not be used as an identifier because it begins with disallowed character "$". Renaming variable to VAR001. +"$UM1" may not be used as an identifier because it begins with disallowed character '$'. Renaming variable to VAR001. -"#UM1" may not be used as an identifier because it begins with disallowed character "#". Renaming variable to VAR002. +"#UM1" may not be used as an identifier because it begins with disallowed character '#'. Renaming variable to VAR002. -"!UM1" may not be used as an identifier because it begins with disallowed character "!". Renaming variable to VAR003. +"!UM1" may not be used as an identifier because it begins with disallowed character '!'. Renaming variable to VAR003. "GE" may not be used as an identifier because it is a reserved word. Renaming variable to VAR004. diff --git a/rust/pspp/src/sys/testdata/multiple_documents_records.expected b/rust/pspp/src/sys/testdata/multiple_documents_records.expected index 634c52ca57..414d01908c 100644 --- a/rust/pspp/src/sys/testdata/multiple_documents_records.expected +++ b/rust/pspp/src/sys/testdata/multiple_documents_records.expected @@ -3,7 +3,7 @@ ├──────────────────────┼────────────────────────┤ │Writer Product │PSPP synthetic test file│ ├──────────────────────┼────────────────────────┤ -│ Compression │SAV │ +│ Compression │None │ │ Number of Cases│Unknown │ ╰──────────────────────┴────────────────────────╯ diff --git a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected index e69de29bb2..950b17e8b6 100644 --- a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected +++ b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected @@ -0,0 +1,51 @@ +At offset 0x1c8, variable attributes record has bad size 4 bytes instead of the expected 1. + +This system file does not indicate its own character encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING="DETECT" to analyze the possible encodings. + +╭──────────────────────┬────────────────────────────────────╮ +│ Created │ 30-JAN-2013 14:34:58│ +├──────────────────────┼────────────────────────────────────┤ +│Writer Product │MS Windows Release 12.0 spssio32.dll│ +├──────────────────────┼────────────────────────────────────┤ +│ Compression │SAV │ +│ Number of Cases│ 10│ +╰──────────────────────┴────────────────────────────────────╯ + +╭─────────┬─╮ +│Variables│4│ +╰─────────┴─╯ + +╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ +│ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ +├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ +│VAR00001│ 1│ │Scale │Input│ 8│Right │F8.2 │F8.2 │ │ +│VAR00002│ 2│ │Nominal │Input│ 8│Right │F8.2 │F8.2 │ │ +│VAR00003│ 3│ │Scale │Input│ 8│Right │F8.2 │F8.2 │ │ +│VAR00004│ 4│ │Nominal │Input│ 8│Left │A1 │A1 │ │ +╰────────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + +╭───────────────────┬──────────╮ +│Variable Value │ │ +├───────────────────┼──────────┤ +│VAR00002 1.00│Male │ +│ 2.00│Female │ +├───────────────────┼──────────┤ +│VAR00003 2.00│Student │ +│ 3.00│Employed │ +│ 4.00│Unemployed│ +╰───────────────────┴──────────╯ + +╭────┬────────┬────────┬────────┬────────╮ +│Case│VAR00001│VAR00002│VAR00003│VAR00004│ +├────┼────────┼────────┼────────┼────────┤ +│1 │ 1.00│ 1.00│ 2.00│a │ +│2 │ 2.00│ 2.00│ 3.00│s │ +│3 │ 3.00│ 1.00│ 4.00│d │ +│4 │ 4.00│ 2.00│ 3.00│f │ +│5 │ 5.00│ 1.00│ 4.00│g │ +│6 │ 6.00│ 2.00│ 2.00│h │ +│7 │ 7.00│ 1.00│ 4.00│j │ +│8 │ 8.00│ 2.00│ 3.00│k │ +│9 │ 9.00│ 1.00│ 2.00│l │ +│10 │ 10.00│ 2.00│ 4.00│p │ +╰────┴────────┴────────┴────────┴────────╯ diff --git a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.sack b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.sack deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.sav b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.sav new file mode 100644 index 0000000000..e36df43756 Binary files /dev/null and b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.sav differ