diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-23 02:36:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-23 16:05:13 -0400 |
commit | 9c1797808996eef47a7954ec580c6db7de1fff76 (patch) | |
tree | 1a15655cf586c34a0b9d33ff5f591dd15e279107 /fs/direct-io.c | |
parent | 50a749c1f2fc8f03232c174c9dbc78a78f9bebfd (diff) |
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 <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/direct-io.c')
0 files changed, 0 insertions, 0 deletions