Re: [PATCH 07/10] staging: unisys: fix chipsetready parsing

2014-07-16 Thread Dan Carpenter
On Tue, Jul 15, 2014 at 01:30:47PM -0400, Benjamin Romer wrote: > + char msgtype[64]; > + int msgparam; > + > + if (sscanf(buf, "%64s %d", msgtype, &msgparam) == 2) { The 64 in "%s64s" is off by one because of the NUL. [ This is where I do my memory corruption preventing dance of succ

[PATCH 07/10] staging: unisys: fix chipsetready parsing

2014-07-15 Thread Benjamin Romer
The chipsetready interface was using strsep() on a const buffer, which is wrong and overcomplicated for what is being done in the function. This patch changes it to use sscanf() instead. Signed-off-by: Benjamin Romer --- .../unisys/visorchipset/visorchipset_main.c| 40 ++-