]> 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>
Wed, 19 Jun 2013 00:07:05 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:56 +0000 (17:26 +1000)
commit805a3ce4c3f1b2bf5eb9188423e43fa2ee34d0d2
treebc09be41c7c46fb4adc7c5ddb9df05e685896c39
parent6bc0411d201d76286005157c98dea0c7dfebb0ca
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