Lines Matching +full:test_read_format_ar +full:. +full:ar

3  * All rights reserved.
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
12 * documentation and/or other materials provided with the distribution.
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 #include "test.h"
26 __FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/test/test_fuzz.c 358088 2020-02-19 01:50:47Z mm $");
31 * http://seclists.org/vulnwatch/2005/q1/0088.html
34 * random values into it and runs it through libarchive. It tries
36 * with each file.
39 * responses other than to ensure that libarchive doesn't crash.
42 * to reproduce failures. Because this test deliberately attempts to
44 * post-failure diagnostics.
48 * developed for other tests. */
50 int uncompress; /* If 1, decompress the file before fuzzing. */
70 for (n = 0; filesets[n].names != NULL; ++n) {
78 extract_reference_files(filesets[n].names);
79 if (filesets[n].uncompress) {
81 /* Use format_raw to decompress the data. */
87 r = archive_read_open_filenames(a, filesets[n].names, 16384);
90 if (filesets[n].names[0] == NULL || filesets[n].names[1] == NULL) {
93 skipping("Cannot uncompress %s", filesets[n].names[0]);
106 if (filesets[n].names[0] == NULL || filesets[n].names[1] == NULL) {
111 "uncompressed test file: %s", filesets[n].names[0]);
119 for (i = 0; filesets[n].names[i] != NULL; ++i)
123 filesets[n].names[i]);
160 /* Fuzz < 1% of the bytes in the archive. */
169 /* Save the messed-up image to a file.
170 * If we crash, that file will be useful. */
172 f = fopen("after.test.failure.send.this.file."
173 "to.libarchive.maintainers.with.system.details", "wb");
179 * end at this time. So we should take a wait while
180 * the operation running.
189 // Try to read all headers and bodies.
206 // Just list headers, skip bodies.
228 "test_read_format_ar.ar",
241 "test_fuzz.cab",
254 "test_read_format_cpio_bin_be.cpio",
258 "test_read_format_cpio_bin_le.cpio",
263 "test_read_format_cpio_svr4_gzip_rpm.rpm",
278 "test_fuzz_1.iso.Z",
282 {0, fileset1}, /* Exercise compress decompressor. */
292 "test_fuzz.lzh",
305 "test_read_format_mtree.mtree",
319 "test_read_format_rar.rar",
324 "test_read_format_rar_binary_data.rar",
329 "test_read_format_rar_compress_best.rar",
334 "test_read_format_rar_compress_normal.rar",
339 "test_read_format_rar_multi_lzss_blocks.rar",
344 "test_read_format_rar_noeof.rar",
349 "test_read_format_rar_ppmd_lzss_conversion.rar",
354 "test_read_format_rar_subblock.rar",
359 "test_read_format_rar_unicode.rar",
363 "test_read_format_rar_multivolume.part0001.rar",
364 "test_read_format_rar_multivolume.part0002.rar",
365 "test_read_format_rar_multivolume.part0003.rar",
366 "test_read_format_rar_multivolume.part0004.rar",
388 "test_compat_bzip2_1.tbz",
392 "test_compat_gtar_1.tar",
396 "test_compat_gzip_1.tgz",
400 "test_compat_gzip_2.tgz",
404 "test_compat_tar_hardlink_1.tar",
408 "test_compat_xz_1.txz",
412 "test_read_format_gtar_sparse_1_17_posix10_modified.tar",
416 "test_read_format_tar_empty_filename.tar",
421 "test_compat_lzop_1.tar.lzo",
427 "test_compat_zstd_1.tar.zst",
432 {0, fileset1}, /* Exercise bzip2 decompressor. */
435 {0, fileset3}, /* Exercise gzip decompressor. */
436 {0, fileset4}, /* Exercise gzip decompressor. */
438 {0, fileset6}, /* Exercise xz decompressor. */
442 {0, fileset9}, /* Exercise lzo decompressor. */
445 {0, fileset10}, /* Exercise zstd decompressor. */
455 "test_compat_zip_1.zip",
459 "test_compat_zip_2.zip",
463 "test_compat_zip_3.zip",
467 "test_compat_zip_4.zip",
471 "test_compat_zip_5.zip",
475 "test_compat_zip_6.zip",
479 "test_read_format_zip.zip",
483 "test_read_format_zip_comment_stored_1.zip",
487 "test_read_format_zip_comment_stored_2.zip",
491 "test_read_format_zip_encryption_data.zip",
495 "test_read_format_zip_encryption_header.zip",
499 "test_read_format_zip_encryption_partially.zip",
503 "test_read_format_zip_filename_cp866.zip",
507 "test_read_format_zip_filename_cp932.zip",
511 "test_read_format_zip_filename_koi8r.zip",
515 "test_read_format_zip_filename_utf8_jp.zip",
519 "test_read_format_zip_filename_utf8_ru.zip",
523 "test_read_format_zip_filename_utf8_ru2.zip",
527 "test_read_format_zip_length_at_end.zip",
531 "test_read_format_zip_mac_metadata.zip",
535 "test_read_format_zip_malformed1.zip",
539 "test_read_format_zip_msdos.zip",
543 "test_read_format_zip_nested.zip",
547 "test_read_format_zip_nofiletype.zip",
551 "test_read_format_zip_padded1.zip",
555 "test_read_format_zip_padded2.zip",
559 "test_read_format_zip_padded3.zip",
563 "test_read_format_zip_symlink.zip",
567 "test_read_format_zip_traditional_encryption_data.zip",
571 "test_read_format_zip_ux.zip",
575 "test_read_format_zip_winzip_aes128.zip",
579 "test_read_format_zip_winzip_aes256.zip",
583 "test_read_format_zip_winzip_aes256_large.zip",
587 "test_read_format_zip_winzip_aes256_stored.zip",
591 "test_read_format_zip_zip64a.zip",
595 "test_read_format_zip_zip64b.zip",