Commit 207db493 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents a9729d97 a4475157
...@@ -148,10 +148,10 @@ static int __set_utsfield(char __user *to, int to_size, ...@@ -148,10 +148,10 @@ static int __set_utsfield(char __user *to, int to_size,
if (copy_to_user(to, from, len)) if (copy_to_user(to, from, len))
return -EFAULT; return -EFAULT;
off = len < to_size? len: len - 1;
if (dotchop) { if (dotchop) {
off = (strnchr(from, len, '.') - from); const char *p = strnchr(from, len, '.');
} else{ if (p) off = p - from;
off = len - 1;
} }
if (__put_user('\0', to + off)) if (__put_user('\0', to + off))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment