]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The scheduler could crash while adding an IPP Everywhere printer (Issue #5258)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 8 Mar 2018 16:48:12 +0000 (11:48 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 8 Mar 2018 16:48:12 +0000 (11:48 -0500)
CHANGES.md
scheduler/ipp.c

index 88c8d9d381311483a334d8cb111a8d088e590cb6..afae3ff3ee3a9f82ec98d41487c4a64ff1ee84ec 100644 (file)
@@ -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)
index 649995bb54388069373f32d687ceff502b873e48..2396c9b58ed88bce4c5659e7559c861d48b80342 100644 (file)
@@ -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);
 }