]> git.ipfire.org Git - thirdparty/cups.git/commit
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)
commit0a834c30dfc044e8b4dcf3e576cb1f196bced3f6
tree03f3d4091b14b2bf8df0fbcd8d70bc512787aab7
parent63f67ee1bccfd94425f98f3b9b0880dfa032a4bb
parent2f8ac404a6757428789046b54eae92671f13eaa7
ppd-emit.c: Fix SEGV in 'ppdEmitString()'

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