- Use upstream patch to handle negative SNMP string lengths (rev 8896).

This commit is contained in:
Tim Waugh 2009-12-08 11:05:54 +00:00
parent f3531893f4
commit 5d76a896b2
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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);

View File

@ -64,6 +64,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
@ -233,6 +234,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
@ -532,6 +534,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Dec 8 2009 Tim Waugh <twaugh@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).