From 4ca864c71e2a18e2f0acc2cdbd339919a7cb9b39 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 28 Nov 2023 08:38:17 +0100 Subject: [PATCH] raster-interpreter.c: Fix crash when incoming `*ptr` is NULL The same fix as in OpenPrinting/CUPS #831 --- ppd/raster-interpret.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ppd/raster-interpret.c b/ppd/raster-interpret.c index de3a38cc..ad0b456b 100644 --- a/ppd/raster-interpret.c +++ b/ppd/raster-interpret.c @@ -1203,6 +1203,9 @@ ppd_scan_ps(_ppd_ps_stack_t *st, // I - Stack int parens; // Parenthesis nesting level + if (!*ptr) + return (NULL); + // // Skip leading whitespace... //