diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-06-05 11:36:07 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2018-06-05 14:46:49 -0400 |
commit | e1ac3f36d07e9b5a11de94cebbc6f624d51508b5 (patch) | |
tree | 8f6f7971431eab05757e07ce16d81694b90e6819 | |
parent | c95282ef0897c16ca4ef1d90f74445d6018f81db (diff) | |
download | cups-e1ac3f36d07e9b5a11de94cebbc6f624d51508b5.tar.gz |
Fix a parsing bug in the pstops filter (Issue #5321)
-rw-r--r-- | CHANGES.md | 1 | ||||
-rw-r--r-- | filter/pstops.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/CHANGES.md b/CHANGES.md index e0b5e9831..911025170 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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, 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; |