Messages in this thread | | | Subject | Re: [patch] Avoid using hardcoded values in kernel/sys.c | From | Joe Perches <> | Date | Mon, 17 Oct 2011 18:21:13 -0700 |
| |
On Mon, 2011-10-17 at 17:55 -0700, David Rientjes wrote: > The release field of struct new_utsname may always change, so avoid > hardcoded values when setting up a buffer to copy to it.
I don't think this is correct.
> diff --git a/kernel/sys.c b/kernel/sys.c [] > -static int override_release(char __user *release, int len) > +static int override_release(char __user *release) > { > + const int len = sizeof(release); > int ret = 0; > - char buf[65]; > + char buf[len];
sizeof(release) = 4 or 8
| |