Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/cups.git#99324c4a1bb7a580bb6c8592c0743bceb08d7266
This commit is contained in:
DistroBaker 2020-12-10 01:11:11 +01:00
parent bfa45ae877
commit c556dd30d6
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,43 @@
diff --git a/cups/http-support.c b/cups/http-support.c
index 6317514..ea8640c 100644
--- a/cups/http-support.c
+++ b/cups/http-support.c
@@ -1,8 +1,9 @@
/*
* HTTP support routines for CUPS.
*
- * Copyright 2007-2019 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright © 2020 by Michael R Sweet
+ * Copyright © 2007-2019 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
* information.
@@ -26,6 +27,8 @@
#elif defined(HAVE_AVAHI)
# include <avahi-client/client.h>
# include <avahi-client/lookup.h>
+// for avahi_free()
+# include <avahi-common/malloc.h>
# include <avahi-common/simple-watch.h>
#endif /* HAVE_DNSSD */
@@ -2536,6 +2539,8 @@ http_resolve_cb(
memcpy(uuid, value, valueLen);
uuid[valueLen] = '\0';
+ avahi_free(value);
+
if (_cups_strcasecmp(uuid, uribuf->uuid))
{
if (uribuf->options & _HTTP_RESOLVE_STDERR)
@@ -2620,6 +2625,8 @@ http_resolve_cb(
memcpy(resource + 1, value, valueLen);
resource[valueLen + 1] = '\0';
}
+
+ avahi_free(value);
}
else
{

View File

@ -15,7 +15,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 2.3.3
Release: 19%{?dist}
Release: 20%{?dist}
License: ASL 2.0
Url: http://www.cups.org/
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
@ -123,6 +123,7 @@ Patch29: cups-manual-copies.patch
# freed as a different attribute type than it was allocated
# backported from upstream https://github.com/OpenPrinting/cups/pull/43
Patch30: 0001-backend-scheduler-ipp.c-Fix-printer-alert-invalid-fr.patch
Patch31: 0001-Fix-memory-leak-Issue-49.patch
##### Patches removed because IMHO they aren't no longer needed
##### but still I'll leave them in git in case their removal
@ -342,6 +343,7 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in
%patch28 -p1 -b .ipptool-mdns-uri
%patch29 -p1 -b .manual-copies
%patch30 -p1 -b .printer-alert
%patch31 -p1 -b .avahi-leak
# if cupsd is set to log into /var/log/cups, then 'MaxLogSize 0' needs to be
@ -768,6 +770,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man7/ippevepcl.7.gz
%changelog
* Tue Nov 24 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-20
- fix memory leak during device discovery
* Thu Nov 12 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.3.3-19
- 1897023 - Cups service restart sequence during upgrade incorrect