When contributed to OSS-fuzz the Ghostscript target fuzzer was
licensed under a "BSD-style" license, referring to a LICENSE file
that actually contained an Apache 2.0 license! Recently the OSS-fuzz
project has added a presubmit check that validates the license of
each project's target fuzzer, causing the Ghostscript target fuzzer
to now fail the test. The Ghostscript target fuzzer therefore needs
to be relicensed under Apache 2.0.
This commit relicenses the existing target fuzzer code under
Apache 2.0 so that the Ghostscript target fuzzer code will pass
OSS-fuzz's presubmit checks allowing for further development.
The first element in the argument array to gsapi_new_instance()
is ignored since it normally is the program name. This means that
the commit introducing the "-K" argument to limit memory usage did
not have its intended effect since the "-K" argument was ignored.
Moreover, prior to that the resolution argument "-r200x200" was
being unintentionally ignored. By introducing a place holder program
name all arguments are taken into account and the reader is reminded
that the first argument is the program name.
* [ghostscript] Fix ininitialized pointer
Passing an invalid pointer causes a crash in gs_new_instance.
* [ghostscript] Add seed corpus
Use the examples distributed with ghostcript as a seed corpus.