arch/frv/kernel/setup.c: use strncmp() instead of memcmp()
authorChen Gang <gang.chen@asianux.com>
Wed, 3 Jul 2013 22:04:53 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:41 +0000 (16:07 -0700)
commit98bd8d05ea5798ff3179ee33f0ca2789722ecc5a
tree370a982aa598bdf50f31ab0f3b3cccba62143ddc
parent760033c45e8aa13c9e02530da7274edc624c7689
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/kernel/setup.c