summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2021-04-05 15:09:07 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2021-04-05 15:09:07 -0400
commit6918883fba4942931dc455b32545d6edf18dec5c (patch)
treec54d2dfa7ff4abca67577199f622d564151c3193 /cups
parentb27a49b8a06e65067b1ca950d39b34ae8b2fa008 (diff)
downloadcups-6918883fba4942931dc455b32545d6edf18dec5c.tar.gz
Update Github repository to match macOS 11.2 CUPS sources (cups-494.1).
Diffstat (limited to 'cups')
-rw-r--r--cups/cups.h6
-rw-r--r--cups/cupspm.md4
-rw-r--r--cups/ipp.c11
-rw-r--r--cups/ppd.c10
4 files changed, 21 insertions, 10 deletions
diff --git a/cups/cups.h b/cups/cups.h
index 74955ebd6..3793dfbe8 100644
--- a/cups/cups.h
+++ b/cups/cups.h
@@ -1,7 +1,7 @@
/*
* API definitions for CUPS.
*
- * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2007-2020 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -42,10 +42,10 @@ extern "C" {
* Constants...
*/
-# define CUPS_VERSION 2.0303
+# define CUPS_VERSION 2.0304
# define CUPS_VERSION_MAJOR 2
# define CUPS_VERSION_MINOR 3
-# define CUPS_VERSION_PATCH 3
+# define CUPS_VERSION_PATCH 4
# define CUPS_BC_FD 3
/* Back-channel file descriptor for
diff --git a/cups/cupspm.md b/cups/cupspm.md
index b6e09baa9..f271c89d3 100644
--- a/cups/cupspm.md
+++ b/cups/cupspm.md
@@ -1,8 +1,8 @@
---
title: CUPS Programming Manual
author: Michael R Sweet
-copyright: Copyright © 2007-2019 by Apple Inc. All Rights Reserved.
-version: 2.3.3
+copyright: Copyright © 2007-2020 by Apple Inc. All Rights Reserved.
+version: 2.3.4
...
> Please [file issues on Github](https://github.com/apple/cups/issues) to
diff --git a/cups/ipp.c b/cups/ipp.c
index 3d529346c..f19747d61 100644
--- a/cups/ipp.c
+++ b/cups/ipp.c
@@ -1,7 +1,7 @@
/*
* Internet Printing Protocol functions for CUPS.
*
- * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2007-2020 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -2866,7 +2866,8 @@ ippReadIO(void *src, /* I - Data source */
unsigned char *buffer, /* Data buffer */
string[IPP_MAX_TEXT],
/* Small string buffer */
- *bufptr; /* Pointer into buffer */
+ *bufptr, /* Pointer into buffer */
+ *bufptrEnd; /* Pointer after valid buffer range */
ipp_attribute_t *attr; /* Current attribute */
ipp_tag_t tag; /* Current tag */
ipp_tag_t value_tag; /* Current value tag */
@@ -3441,6 +3442,8 @@ ippReadIO(void *src, /* I - Data source */
}
bufptr = buffer;
+ bufptrEnd = &buffer[n];
+
/*
* text-with-language and name-with-language are composite
@@ -3454,7 +3457,7 @@ ippReadIO(void *src, /* I - Data source */
n = (bufptr[0] << 8) | bufptr[1];
- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE) || n >= (int)sizeof(string))
+ if ((bufptr + 2 + n) > bufptrEnd || n >= (int)sizeof(string))
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL,
_("IPP language length overflows value."), 1);
@@ -3481,7 +3484,7 @@ ippReadIO(void *src, /* I - Data source */
bufptr += 2 + n;
n = (bufptr[0] << 8) | bufptr[1];
- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE))
+ if ((bufptr + 2 + n) > bufptrEnd)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL,
_("IPP string length overflows value."), 1);
diff --git a/cups/ppd.c b/cups/ppd.c
index 199cf0348..cf84833a4 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -2335,8 +2335,16 @@ ppd_add_attr(ppd_file_t *ppd, /* I - PPD file data */
* Copy data over...
*/
+ if (!_cups_strcasecmp(spec, "custom") || !_cups_strncasecmp(spec, "custom.", 7))
+ {
+ temp->spec[0] = '_';
+ strlcpy(temp->spec + 1, spec, sizeof(temp->spec) - 1);
+ }
+ else {
+ strlcpy(temp->spec, spec, sizeof(temp->spec));
+ }
+
strlcpy(temp->name, name, sizeof(temp->name));
- strlcpy(temp->spec, spec, sizeof(temp->spec));
strlcpy(temp->text, text, sizeof(temp->text));
temp->value = (char *)value;