File tree Expand file tree Collapse file tree 3 files changed +63
-0
lines changed
projects/apache-commons-compress Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ ////////////////////////////////////////////////////////////////////////////////
16
+
17
+ import org .apache .commons .compress .archivers .ArchiveException ;
18
+ import org .apache .commons .compress .archivers .dump .DumpArchiveInputStream ;
19
+
20
+ import java .io .ByteArrayInputStream ;
21
+ import java .io .IOException ;
22
+
23
+ public class ArchiverDumpFuzzer extends BaseTests {
24
+ public static void fuzzerTestOneInput (byte [] data ) {
25
+ try {
26
+ fuzzArchiveInputStream (new DumpArchiveInputStream (new ByteArrayInputStream (data )));
27
+ } catch (ArchiveException |IOException ignored ) {
28
+ }
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ ////////////////////////////////////////////////////////////////////////////////
16
+
17
+ import org .apache .commons .compress .compressors .pack200 .Pack200CompressorInputStream ;
18
+
19
+ import java .io .ByteArrayInputStream ;
20
+ import java .io .IOException ;
21
+
22
+ public class CompressorPack200Fuzzer extends BaseTests {
23
+ public static void fuzzerTestOneInput (byte [] data ) {
24
+ try {
25
+ fuzzCompressorInputStream (new Pack200CompressorInputStream (new ByteArrayInputStream (data )));
26
+ } catch (IOException ignored ) {
27
+ }
28
+ }
29
+ }
Original file line number Diff line number Diff line change 47
47
zip -j0 $SRC/ArchiverArjFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.arj && \
48
48
zip -j0 $SRC/ArchiverCpioFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.cpio && \
49
49
zip -uj0 $SRC/ArchiverCpioFuzzer_seed_corpus.zip commons-compress/src/test/resources/archives/*.cpio && \
50
+ zip -j0 $SRC/ArchiverDumpFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.dump && \
51
+ zip -uj0 $SRC/ArchiverDumpFuzzer_seed_corpus.zip commons-compress/src/test/resources/org/apache/commons/compress/dump/*.dump && \
50
52
zip -j0 $SRC/CompressSevenZFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.7z && \
51
53
zip -uj0 $SRC/CompressTarFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.tar && \
52
54
zip -uj0 $SRC/CompressTarFuzzer_seed_corpus.zip commons-compress/src/test/resources/archives/*.tar && \
59
61
zip -j0 $SRC/CompressorDeflate64Fuzzer_seed_corpus.zip commons-compress/src/test/resources/*.deflate && \
60
62
zip -uj0 $SRC/CompressorGzipFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.gz && \
61
63
zip -j0 $SRC/CompressorLZ4Fuzzer_seed_corpus.zip commons-compress/src/test/resources/*lz4 && \
64
+ zip -j0 $SRC/CompressorPack200Fuzzer_seed_corpus.zip commons-compress/src/test/resources/*.pack && \
65
+ zip -uj0 $SRC/CompressorPack200Fuzzer_seed_corpus.zip commons-compress/src/test/resources/pack200/*.pack && \
62
66
zip -uj0 $SRC/CompressorSnappyFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.sz && \
63
67
zip -j0 $SRC/CompressorZFuzzer_seed_corpus.zip commons-compress/src/test/resources/*.Z
64
68
You can’t perform that action at this time.
0 commit comments