Update flags and enable new sanitizer (#3587)

* [ghostscript] Replace deprecated flag by current flag.

In old versions of Ghostscript the flag -dPARANOIDSAFER did
more checks than -dSAFER did. In modern versions the two flags
are identical. Moreover the flag -dPARANOIDSAFER has been
deprecated for a long time, and may be removed in the future.

In Ghostscript 9.50 and later -dSAFER is the default, and does
not have to be specified. To be able to test older yet still
modern Ghostscript versions without problems -dSAFER is used.

* [ghostscript] Force enable banding while rendering.

Ghostscript uses the set resolution to determine if banding should be
enabled during rendering, or not. Under normal circumstances documents
are rendered at maybe 600 DPI, but to conserve memory while running in
OSS-fuzz 200 DPI is used (-r200x200). To still test the banding code
used under normal circumstances banding is force enabled.

Moreover BufferSpace is used to determine the band height and thus the
number of bands. At 600 DPI this is normally 4Mbyte, so a reasonable
approximate at 200 DPI is 450k. Thus BufferSpace is also set.

* [ghostscript] Enable another sanitizer to see more issues.
This commit is contained in:
Sebastian Rasmussen 2020-04-08 00:10:11 +08:00 committed by GitHub
parent c13b7e1c2e
commit e2e155fe0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -58,10 +58,12 @@ static int gs_to_raster_fuzz(const unsigned char *buf, size_t size)
"gs",
"-K1048576",
"-r200x200",
"-dMaxBitmap=0",
"-dBufferSpace=450k",
"-dMediaPosition=1",
"-dcupsColorSpace=1", /* RGB */
"-dQUIET",
"-dPARANOIDSAFER",
"-dSAFER",
"-dNOPAUSE",
"-dBATCH",
"-dNOINTERPOLATE",

View File

@ -8,3 +8,4 @@ auto_ccs:
- "julians.artifex@gmail.com"
sanitizers:
- address
- memory