summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-06-05 11:36:07 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-06-05 11:36:07 -0400
commit0541a2c9f4c9bbd69071d63c5a2e98d2f72926c5 (patch)
tree3f7fb2b68254fad8a42383ea030c8f770a2d7a60 /filter
parent53f8404482c16487ae2464b348de0c9c46693040 (diff)
downloadcups-0541a2c9f4c9bbd69071d63c5a2e98d2f72926c5.tar.gz
Fix a parsing bug in the pstops filter (Issue #5321)
Diffstat (limited to 'filter')
-rw-r--r--filter/pstops.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/filter/pstops.c b/filter/pstops.c
index 5bdac5257..906a6e78c 100644
--- a/filter/pstops.c
+++ b/filter/pstops.c
@@ -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;