- Fixed a performance regression with large PPDs (rdar://47040759)
- The scheduler did not encode octetString values like "job-password" correctly
for the print filters (Issue #5558)
+- The `cupsCheckDestSupported` function did not check octetString values
+ correctly (Issue #5557)
- Updated the systemd service file for cupsd (Issue #5551)
- The `ippValidateAttribute` function did not catch all instances of invalid
UTF-8 strings (Issue #5509)
/*
* Destination option/media support for CUPS.
*
- * Copyright © 2012-2018 by Apple Inc.
+ * Copyright © 2012-2019 by Apple Inc.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
ipp_res_t units_value; /* Resolution units */
ipp_attribute_t *attr; /* Attribute */
_ipp_value_t *attrval; /* Current attribute value */
+ _ipp_option_t *map; /* Option mapping information */
/*
* Check literal values...
*/
+ map = _ippFindOption(option);
+
switch (attr->value_tag)
{
case IPP_TAG_INTEGER :
+ if (map && map->value_tag == IPP_TAG_STRING)
+ return (strlen(value) <= (size_t)attr->values[0].integer);
+
case IPP_TAG_ENUM :
int_value = atoi(value);
return (attr->values[0].boolean);
case IPP_TAG_RANGE :
- int_value = atoi(value);
+ if (map && map->value_tag == IPP_TAG_STRING)
+ int_value = (int)strlen(value);
+ else
+ int_value = atoi(value);
for (i = 0; i < attr->num_values; i ++)
if (int_value >= attr->values[i].range.lower &&