ghostscript: add two new vector device targets (#8358)

This commit is contained in:
DavidKorczynski 2022-08-26 12:28:32 +01:00 committed by GitHub
parent f0e5d9be61
commit 3377581f8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 1 deletions

View File

@ -45,7 +45,7 @@ CPPFLAGS="${CPPFLAGS:-} $CUPS_CFLAGS -DPACIFY_VALGRIND" ./autogen.sh \
CUPSCONFIG=$CUPSCONFIG \
--enable-freetype --enable-fontconfig \
--enable-cups --with-ijs --with-jbig2dec \
--with-drivers=pdfwrite,cups,ljet4,laserjet,pxlmono,pxlcolor,pcl3,uniprint,pgmraw,ps2write,png16m,tiffsep1,faxg3,psdcmyk,eps2write,bmpmono
--with-drivers=pdfwrite,cups,ljet4,laserjet,pxlmono,pxlcolor,pcl3,uniprint,pgmraw,ps2write,png16m,tiffsep1,faxg3,psdcmyk,eps2write,bmpmono,xpswrite
make -j$(nproc) libgs
fuzzers="gstoraster_fuzzer \
@ -61,6 +61,8 @@ fuzzers="gstoraster_fuzzer \
gs_device_eps2write_fuzzer \
gs_device_faxg3_fuzzer \
gs_device_bmpmono_fuzzer \
gs_device_xpswrite_fuzzer \
gs_device_pxlcolor_fuzzer \
gs_device_tiffsep1_fuzzer"
for fuzzer in $fuzzers; do
@ -100,6 +102,8 @@ cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_pdfwrite_fuzzer_seed
cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_pxlmono_fuzzer_seed_corpus.zip"
cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_eps2write_fuzzer_seed_corpus.zip"
cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_bmpmono_fuzzer_seed_corpus.zip"
cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_xpswrite_fuzzer_seed_corpus.zip"
cp "$OUT/gstoraster_fuzzer_seed_corpus.zip" "$OUT/gs_device_pxlcolor_fuzzer_seed_corpus.zip"
# Copy out options
cp $SRC/*.options $OUT/

View File

@ -0,0 +1,20 @@
/* Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "gs_fuzzlib.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
fuzz_gs_device(data, size, 1, "pxlcolor", "/dev/null");
return 0;
}

View File

@ -0,0 +1,20 @@
/* Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "gs_fuzzlib.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
fuzz_gs_device(data, size, 1, "xpswrite", "/dev/null");
return 0;
}