From: Aizal Khan Date: Wed, 1 Jul 2026 07:59:30 +0000 (+0530) Subject: stop response skip loop at nul in commandtops X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc7f3e38f901855249d02bfb4f920ab5c19a2975;p=thirdparty%2Fcups.git stop response skip loop at nul in commandtops --- diff --git a/filter/commandtops.c b/filter/commandtops.c index c0c38945d0..c19b16d894 100644 --- a/filter/commandtops.c +++ b/filter/commandtops.c @@ -318,7 +318,7 @@ auto_configure(ppd_file_t *ppd, /* I - PPD file */ else break; - for (bufptr = buffer; isspace(*bufptr & 255) || iscntrl(*bufptr & 255); + for (bufptr = buffer; *bufptr && (isspace(*bufptr & 255) || iscntrl(*bufptr & 255)); bufptr ++); if (bufptr > buffer)