aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEdward Barnard2017-05-05 10:14:15 +0100
committerEdward Barnard2017-05-05 10:14:15 +0100
commitb077f9c93dc59f253435340b353edd0721dea58f (patch)
tree6e93ee1d302031c9c8d955f870afbe9d90e03f9d /tests
parent645aece10f5b25ba015ef5ff240586a2f38aad7e (diff)
downloadrust-plist-b077f9c93dc59f253435340b353edd0721dea58f.tar.bz2
Limit binary plist stack depth to prevent stack overflows.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/binary_circular_array.plistbin0 -> 451 bytes
-rw-r--r--tests/fuzzer.rs6
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/data/binary_circular_array.plist b/tests/data/binary_circular_array.plist
new file mode 100644
index 0000000..57d4575
--- /dev/null
+++ b/tests/data/binary_circular_array.plist
Binary files differ
diff --git a/tests/fuzzer.rs b/tests/fuzzer.rs
index 100e569..44d4297 100644
--- a/tests/fuzzer.rs
+++ b/tests/fuzzer.rs
@@ -39,6 +39,12 @@ fn binary_nan_date() {
test_fuzzer_data_err(data);
}
+#[test]
+fn binary_circular_array() {
+ let data = include_bytes!("data/binary_circular_array.plist");
+ test_fuzzer_data_err(data);
+}
+
// Issue 20 - not found by fuzzing but this is a convenient place to put the test.
#[test]
fn issue_20_binary_with_data_in_trailer() {