Re: [Linux-fbdev-devel] [PATCH] fb: sm501fb off-by-1 sysfs store

2007-03-01 Thread Paul Mundt
On Thu, Mar 01, 2007 at 02:25:55PM +0100, Geert Uytterhoeven wrote: > On Thu, 1 Mar 2007, Paul Mundt wrote: > > @@ -1074,9 +1074,9 @@ static ssize_t sm501fb_crtsrc_store(struct device > > *dev, > > if (len < 1) > > return -EINVAL; > > > > - if (strnicmp(buf, "crt", sizeof("crt"

Re: [Linux-fbdev-devel] [PATCH] fb: sm501fb off-by-1 sysfs store

2007-03-01 Thread Geert Uytterhoeven
On Thu, 1 Mar 2007, Paul Mundt wrote: > Currently sm501fb_crtsrc_store() won't allow the routing to be changed > via echos from userspace in to the sysfs file. The reason for this is > that the strnicmp() for both heads uses a sizeof() for the string length, > which ends up being strlen() + 1 (\0 i