Re: [PATCH] drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow

2013-03-29 Thread Chen Gang
On 2013年03月29日 21:51, Corey Minyard wrote: > Yes, this is correct, I've pulled it into my tree. thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH] drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow

2013-03-29 Thread Corey Minyard
Yes, this is correct, I've pulled it into my tree. -corey On 03/29/2013 02:18 AM, Chen Gang wrote: 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

[PATCH] drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow

2013-03-29 Thread Chen Gang
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)"