From: Michael R Sweet Date: Thu, 8 Mar 2018 16:48:12 +0000 (-0500) Subject: The scheduler could crash while adding an IPP Everywhere printer (Issue #5258) X-Git-Tag: v2.3b4~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca75cc1354a4156cee6d9f228949e6b3e5b15e16;p=thirdparty%2Fcups.git The scheduler could crash while adding an IPP Everywhere printer (Issue #5258) --- diff --git a/CHANGES.md b/CHANGES.md index 88c8d9d381..afae3ff3ee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Changes in CUPS v2.3rc1 - Fixed a compile issue when PAM is not available (Issue #5253) - Label printers supported by the rastertolabel driver don't support SNMP, so don't delay printing to test it (Issue #5256) +- The scheduler could crash while adding an IPP Everywhere printer (Issue #5258) - The Lexmark Optra E310 printer needs the "no-reattach" USB quirk rule (Issue #5259) - The IPP backend did not properly detect failed PDF prints (rdar://34055474) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 649995bb54..2396c9b58e 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -4873,6 +4873,8 @@ copy_printer_attrs( * and document-format attributes that may be provided by the client. */ + _cupsRWLockRead(&printer->lock); + curtime = time(NULL); if (!ra || cupsArrayFind(ra, "marker-change-time")) @@ -5034,6 +5036,8 @@ copy_printer_attrs( if (printer->ppd_attrs) copy_attrs(con->response, printer->ppd_attrs, ra, IPP_TAG_ZERO, 0, NULL); copy_attrs(con->response, CommonData, ra, IPP_TAG_ZERO, IPP_TAG_COPY, NULL); + + _cupsRWUnlock(&printer->lock); }