diff options
| author | Chen Gang <[email protected]> | 2013-05-16 19:04:25 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-05-16 20:49:25 +0000 |
| commit | a5f2b3d6a738e7d4180012fe7b541172f8c8dcea (patch) | |
| tree | b234eea77819c6fc89529468b0b8db9b6e7bcf8a /tools/perf/util/scripting-engines/trace-event-perl.c | |
| parent | drivers: char: ipmi: Replaced kmalloc and strcpy with kstrdup (diff) | |
| download | kernel-a5f2b3d6a738e7d4180012fe7b541172f8c8dcea.tar.gz kernel-a5f2b3d6a738e7d4180012fe7b541172f8c8dcea.zip | |
drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow
When calling memcpy, read_data and write_data need additional 2 bytes.
write_data:
for checking: "if (size > IPMI_MAX_MSG_LENGTH)"
for operating: "memcpy(bt->write_data + 3, data + 1, size - 1)"
read_data:
for checking: "if (msg_len < 3 || msg_len > IPMI_MAX_MSG_LENGTH)"
for operating: "memcpy(data + 2, bt->read_data + 4, msg_len - 2)"
Signed-off-by: Chen Gang <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions
