Code sync
[external/hplip.git] / packaging / CVE-2010-4267.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 # Description: fix denial of service and possible arbitrary code
3 #  execution via long SNMP response
4 # Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610960
5 # Author: Sebastian Krahmer
6
7 @DPATCH@
8 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' hplip-3.11.1~/io/hpmud/pml.c hplip-3.11.1/io/hpmud/pml.c
9 --- hplip-3.11.1~/io/hpmud/pml.c        2011-01-19 00:18:21.000000000 -0500
10 +++ hplip-3.11.1/io/hpmud/pml.c 2011-01-24 13:20:25.000000000 -0500
11 @@ -504,6 +504,8 @@
12        p += 2;                               /* eat type and length */
13     }
14     
15 +   if (dLen > buf_size)
16 +      dLen = buf_size;
17     memcpy(buf, p, dLen);
18     *bytes_read = dLen; 
19     *type = dt;