]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arch/frv/kernel/setup.c: use strncmp() instead of memcmp()
authorChen Gang <gang.chen@asianux.com>
Fri, 7 Jun 2013 00:08:36 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:42:40 +0000 (15:42 +1000)
commit7bf12e10430358f324342cf4efdf5fbae36dadfe
tree0fe47668bdf8b4b6e413e418f0ea599b73254b40
parente1eac01c8b4578c69614b2d1270b8a9dc0773f49
arch/frv/kernel/setup.c: use strncmp() instead of memcmp()

'cmdline' is a NUL terminated string, when its length < 4, memcmp()
will cause memory access out of boundary.

So use strncmp() instead of memcmp().

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/frv/kernel/setup.c