rpms/cups/devel cups-negative-snmp-string-length.patch, NONE, 1.1 cups.spec, 1.555, 1.556

Tim Waugh twaugh at fedoraproject.org
Tue Dec 8 11:06:55 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19516

Modified Files:
	cups.spec 
Added Files:
	cups-negative-snmp-string-length.patch 
Log Message:
* Tue Dec  8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
- Use upstream patch to handle negative SNMP string lengths (rev 8896).


cups-negative-snmp-string-length.patch:
 network.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- NEW FILE cups-negative-snmp-string-length.patch ---
diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/backend/network.c
--- cups-1.4.2/backend/network.c.negative-snmp-string-length	2009-08-31 19:45:43.000000000 +0100
+++ cups-1.4.2/backend/network.c	2009-12-08 11:03:05.728413423 +0000
@@ -170,9 +170,13 @@ backendNetworkSideCB(
 
 	        case CUPS_ASN1_BIT_STRING :
 	        case CUPS_ASN1_OCTET_STRING :
-		    i = (int)(sizeof(data) - (dataptr - data));
-		    if (packet.object_value.string.num_bytes < i)
+		    if (packet.object_value.string.num_bytes < 0)
+		      i = 0;
+		    else if (packet.object_value.string.num_bytes < 
+			     (sizeof(data) - (dataptr - data)))
 		      i = packet.object_value.string.num_bytes;
+		    else
+		      i = (int)(sizeof(data) - (dataptr - data));
 
 		    memcpy(dataptr, packet.object_value.string.bytes, i);
 


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.555
retrieving revision 1.556
diff -u -p -r1.555 -r1.556
--- cups.spec	8 Dec 2009 10:59:20 -0000	1.555
+++ cups.spec	8 Dec 2009 11:06:55 -0000	1.556
@@ -62,6 +62,7 @@ Patch37: cups-str3413.patch
 Patch38: cups-str3439.patch
 Patch39: cups-str3440.patch
 Patch40: cups-str3442.patch
+Patch41: cups-negative-snmp-string-length.patch
 
 Patch100: cups-lspp.patch
 
@@ -231,6 +232,7 @@ module. 
 %patch38 -p1 -b .str3439
 %patch39 -p1 -b .str3440
 %patch40 -p1 -b .str3442
+%patch41 -p1 -b .negative-snmp-string-length
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -522,6 +524,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %changelog
 * Tue Dec  8 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-14
+- Use upstream patch to handle negative SNMP string lengths (rev 8896).
 - Use upstream fix for SNMP detection (bug #542857, STR #3413).
 - Use the text filter for text/css files (bug #545026, STR #3442).
 - Show conflicting option values in web UI (bug #544326, STR #3440).




More information about the fedora-extras-commits mailing list