Skip to content

Commit

Permalink
Merge pull request from GHSA-pf5r-86w9-678h
Browse files Browse the repository at this point in the history
raster-interpret.c: Fix CVE-2023-4504
  • Loading branch information
zdohnal authored Sep 20, 2023
2 parents ee9f25a + a9a7daa commit 515d31d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cups/raster-interpret.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,19 @@ scan_ps(_cups_ps_stack_t *st, /* I - Stack */

cur ++;

if (*cur == 'b')
/*
* Return NULL if we reached NULL terminator, a lone backslash
* is not a valid character in PostScript.
*/

if (!*cur)
{
*ptr = NULL;

return (NULL);
}

if (*cur == 'b')
*valptr++ = '\b';
else if (*cur == 'f')
*valptr++ = '\f';
Expand Down

0 comments on commit 515d31d

Please sign in to comment.