summaryrefslogtreecommitdiff
path: root/patches/source/hplip/hplip.CVE-2010-4267.diff
blob: d7adcdba23466c15b09abdf3b3693c20a0d19d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- hplip-3.10.2.orig/io/hpmud/pml.c	2010-12-06 13:35:12.046894255 -0500
+++ hplip-3.10.2.orig/io/hpmud/pml.c	2010-12-06 13:34:35.018894207 -0500
@@ -504,6 +504,8 @@ enum HPMUD_RESULT hpmud_get_pml(HPMUD_DE
       p += 2;                               /* eat type and length */
    }
    
+   if (dLen > buf_size)
+      dLen = buf_size;
    memcpy(buf, p, dLen);
    *bytes_read = dLen; 
    *type = dt;