Skip to content

Commit 0542b9d

Browse files
committed
Fix parsing bug in new cupsParseOptions implementation.
1 parent 06119ce commit 0542b9d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cups/options.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ cupsParseOptions(
261261
// End after the closing brace...
262262
if (*ptr == '}' && *copyarg == '{')
263263
{
264-
ptr ++;
264+
*ptr++ = '\0';
265265
break;
266266
}
267267

@@ -340,6 +340,12 @@ cupsParseOptions(
340340
// Normal space-delimited string...
341341
while (*ptr && !_cups_isspace(*ptr))
342342
{
343+
if (*ptr == '}' && *copyarg == '{')
344+
{
345+
*ptr++ = '\0';
346+
break;
347+
}
348+
343349
if (*ptr == '\\' && ptr[1])
344350
_cups_strcpy(ptr, ptr + 1);
345351

0 commit comments

Comments
 (0)