cgroups: add check for strcpy destination string overflow
authorEvgeny Kuznetsov <ext-eugeny.kuznetsov@nokia.com>
Wed, 27 Oct 2010 22:33:37 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 01:03:09 +0000 (18:03 -0700)
commitf4a2589feaef0a9b737a3e582b37ee96695bb25f
treeea5eb5c6f2c1f826893271b861d63272efd6546d
parent32a8cf235e2f192eb002755076994525cdbaa35a
cgroups: add check for strcpy destination string overflow

Function "strcpy" is used without check for maximum allowed source string
length and could cause destination string overflow.  Check for string
length is added before using "strcpy".  Function now is return error if
source string length is more than a maximum.

akpm: presently considered NotABug, but add the check for general
future-safeness and robustness.

Signed-off-by: Evgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup.c