Skip to content

Commit

Permalink
raster-interpreter.c: Fix crash in 'scan_ps()' found by fuzzer
Browse files Browse the repository at this point in the history
Fuzzer using _cupsRasterExecPS() found a way how to pass NULL into scan_ps(), causing crash - we have to sanitize the argument for NULL to fix it.

Fixes #831
  • Loading branch information
zdohnal authored Nov 27, 2023
2 parents a7a80bd + 609ea2b commit 59dbbdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cups/raster-interpret.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@ scan_ps(_cups_ps_stack_t *st, /* I - Stack */
int parens; /* Parenthesis nesting level */


if (!*ptr)
return (NULL);
/*
* Skip leading whitespace...
*/
Expand Down

0 comments on commit 59dbbdb

Please sign in to comment.