]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
ppd-emit.c: Fix SEGV in 'ppdEmitString()'
authorzdohnal <zdohnal@redhat.com>
Thu, 4 Jan 2024 09:53:05 +0000 (10:53 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Jan 2024 09:53:05 +0000 (10:53 +0100)
When using testppd.c as a harness, a fuzzer found a way to call ppdPageSize() with NULL return value.
This caused a segmentation fault because the size structure, which is used by values[pos], was assigned a NULL value.
To avoid this, we need to add a NULL value check for the size structure, free allocated memory, and return NULL.

Fixes #849


Trivial merge