From: Kulikov Vasiliy Date: Fri, 23 Jul 2010 06:36:15 +0000 (+0000) Subject: net: s2io: fix buffer overflow X-Git-Tag: v2.6.36-rc1~571^2~109 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c1797808996eef47a7954ec580c6db7de1fff76;p=pandora-kernel.git net: s2io: fix buffer overflow vpd_data[] is allocated as kmalloc(256, GFP_KERNEL), so if cnt = 255 then (cnt + 3) overflows 256. memset() is executed without checking. vpd_data[cnt+2] must be less than 256-cnt-2 as the latter is number of vpd_data[] elements to copy. Do not fill with zero the beginning of nic->serial_num as it will be filled with vpd_data[]. String in product_name[] should be terminated by '\0'. Signed-off-by: Kulikov Vasiliy Signed-off-by: David S. Miller --- Reading git-diff-tree failed