]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix a parsing bug in the pstops filter (Issue #5321)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 5 Jun 2018 15:36:07 +0000 (11:36 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 5 Jun 2018 18:46:49 +0000 (14:46 -0400)
CHANGES.md
filter/pstops.c

index e0b5e9831b0390d1b3956b3299d3f402995d0920..9110251700354d3cc0d0c5b90038631b2e498108 100644 (file)
@@ -16,6 +16,7 @@ Changes in CUPS v2.3b5
 - The scheduler was always restarted after idle-exit with systemd (Issue #5297)
 - Added a USB quirks rule for the HP LaserJet P1102 (Issue #5310)
 - The mailto notifier did not wait for the welcome message (Issue #5312)
+- Fixed a parsing bug in the pstops filter (Issue #5321)
 - Documentation updates (Issue #5299, Issue #5301, Issue #5306)
 - The scheduler allowed environment variables to be specified in the
   `cupsd.conf` file (rdar://37836779, rdar://37836995, rdar://37837252,
index 5bdac5257d652964d0ee7a2c846743f81b56b663..906a6e78c2b3bc4380717493ee1bd9b1ac097811 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * PostScript filter for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
- * Copyright 1993-2007 by Easy Software Products.
+ * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 1993-2007 by Easy Software Products.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -2229,7 +2230,7 @@ parse_text(const char *start,             /* I - Start of text value */
   bufptr = buffer;
   bufend = buffer + bufsize - 1;
 
-  while (bufptr < bufend)
+  while (*start && bufptr < bufend)
   {
     if (isspace(*start & 255) && !level)
       break;