aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/test
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-06-27 13:37:34 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-06-27 13:37:34 +0000
commit085fce401bac81381be296026985e704e94a99e2 (patch)
treea699c379fc1ca7d6eeb028253359da411e8a6231 /libarchive/test
parentc31a08f64d5475900060540bea0d534466f88f6e (diff)
downloadsrc-085fce401bac81381be296026985e704e94a99e2.tar.gz
src-085fce401bac81381be296026985e704e94a99e2.zip
Update vendor/libarchive/dist to git d6d3799d6b309593f271c4c319dfba92efc95772
Relevant vendor changes: PR #1217: RAR5 reader - fix ARM filter going beyond window buffer boundary (OSS-Fuzz 15431) PR #1218: Fixes to sparse file handling
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=349454
Diffstat (limited to 'libarchive/test')
-rw-r--r--libarchive/test/test_read_format_rar5.c15
-rw-r--r--libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu9
2 files changed, 24 insertions, 0 deletions
diff --git a/libarchive/test/test_read_format_rar5.c b/libarchive/test/test_read_format_rar5.c
index 2a55e2015510..b4ef29e464bf 100644
--- a/libarchive/test/test_read_format_rar5.c
+++ b/libarchive/test/test_read_format_rar5.c
@@ -1215,3 +1215,18 @@ DEFINE_TEST(test_read_format_rar5_different_window_size)
EPILOGUE();
}
+
+DEFINE_TEST(test_read_format_rar5_arm_filter_on_window_boundary)
+{
+ char buf[4096];
+ PROLOGUE("test_read_format_rar5_arm_filter_on_window_boundary.rar");
+
+ /* Return codes of those calls are ignored, because this sample file
+ * is invalid. However, the unpacker shouldn't produce any SIGSEGV
+ * errors during processing. */
+
+ (void) archive_read_next_header(a, &ae);
+ while(0 != archive_read_data(a, buf, sizeof(buf))) {}
+
+ EPILOGUE();
+}
diff --git a/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu b/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu
new file mode 100644
index 000000000000..b2b9fdb6087a
--- /dev/null
+++ b/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu
@@ -0,0 +1,9 @@
+begin 600 test_read_format_rar5_arm_filter_on_window_boundary.rar
+M4F%R(1H'`0"-[P+2``(''(`'`/[_(`#_!``"(0$``/X(TB`!'O___P@``/W_
+M_Q``_]U84%"0_P1LAFVQ9,S,M[$`20"#__\`_P#_`/G___!DSR0V2+$`20`Z
+M@R[_______\I:!<**-@P70D`KB1!<YOZFQ/___^<`^5L*0```/________\_
+M`0#__RE@%PHHV#!="0"N)$%S"```_?]84/7___]0D/\$;(9ML63,S/\R'Q\?
+M'Q\?'Q\?'Q\?'Q\?'[$`20"#__\`_P#_`/G___!DSR0V2+$`20`Z@R[_____
+0_Q\?'Q\?'Q\?'Q]5"E`*4```
+`
+end