a shared CUPS printer (Issue #5361)
- Fixed some memory leaks discovered by Coverity (Issue #5375)
- The PPD compiler incorrectly terminated JCL options (Issue #5379)
+- The cupstestppd utility did not generate errors for missing/mismatched
+ CloseUI/JCLCloseUI keywords (Issue #5381)
- The scheduler was being backgrounded on macOS, causing applications to spin
(rdar://40436080)
- The scheduler did not validate that required initial request attributes were
/*
* PPD file routines for CUPS.
*
- * Copyright 2007-2017 by Apple Inc.
+ * Copyright 2007-2018 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
_("Bad custom parameter"),
_("Missing option keyword"),
_("Bad value string"),
- _("Missing CloseGroup")
+ _("Missing CloseGroup"),
+ _("Bad CloseUI/JCLCloseUI"),
+ _("Missing CloseUI/JCLCloseUI")
};
choice->code = _cupsStrRetain(custom_attr->value);
}
}
- else if (!strcmp(keyword, "CloseUI") || !strcmp(keyword, "JCLCloseUI"))
+ else if (!strcmp(keyword, "CloseUI"))
{
+ if ((!option || option->section == PPD_ORDER_JCL) && pg->ppd_conform == PPD_CONFORM_STRICT)
+ {
+ pg->ppd_status = PPD_BAD_CLOSE_UI;
+
+ goto error;
+ }
+
+ option = NULL;
+
+ _cupsStrFree(string);
+ string = NULL;
+ }
+ else if (!strcmp(keyword, "JCLCloseUI"))
+ {
+ if ((!option || option->section != PPD_ORDER_JCL) && pg->ppd_conform == PPD_CONFORM_STRICT)
+ {
+ pg->ppd_status = PPD_BAD_CLOSE_UI;
+
+ goto error;
+ }
+
option = NULL;
_cupsStrFree(string);
_cupsStrFree(string);
}
+ /*
+ * Check for a missing CloseUI/JCLCloseUI...
+ */
+
+ if (option && pg->ppd_conform == PPD_CONFORM_STRICT)
+ {
+ pg->ppd_status = PPD_MISSING_CLOSE_UI;
+ goto error;
+ }
+
/*
* Check for a missing CloseGroup...
*/
PPD_MISSING_OPTION_KEYWORD, /* Missing option keyword */
PPD_BAD_VALUE, /* Bad value string */
PPD_MISSING_CLOSE_GROUP, /* Missing CloseGroup */
+ PPD_BAD_CLOSE_UI, /* Bad CloseUI/JCLCloseUI */
+ PPD_MISSING_CLOSE_UI, /* Missing CloseUI/JCLCloseUI */
PPD_MAX_STATUS /* @private@ */
} ppd_status_t;