LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File hplip-2.8.7-CVE-2010-4276.patch of Package hplip (Project openSUSE:Evergreen:11.1:Test)

 io/hpmud/pml.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/io/hpmud/pml.c b/io/hpmud/pml.c
index 388d8ea..92085b8 100644
--- a/io/hpmud/pml.c
+++ b/io/hpmud/pml.c
@@ -500,6 +500,8 @@ enum HPMUD_RESULT hpmud_get_pml(HPMUD_DEVICE device, HPMUD_CHANNEL channel, cons
       p += 2;                               /* eat type and length */
    }
    
+   if (dLen > buf_size)
+     dLen = buf_size;
    memcpy(buf, p, dLen);
    *bytes_read = dLen; 
    *type = dt;