]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: Yosemite, Emma: Fix off-by-two in arcs_cmdline buffer size check
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 29 Oct 2011 13:45:56 +0000 (15:45 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 15 Nov 2011 21:13:27 +0000 (21:13 +0000)
commitf484fc04e26dafde1b8b16ba26d1c94d1a2b9291
treec12831906ef8ff24ff81a6d6dc38e43e4f2c6f9b
parentcfcfc9eca2bcbd26a8e206baeb005b055dbf8e37
MIPS: Yosemite, Emma: Fix off-by-two in arcs_cmdline buffer size check

Cause is a misplaced bracket.

The code

    strlen(buf+1)

will be two bytes less than

    strlen(buf)+1

The +1 is in this code to reserve space for an additional space character.

[ralf@linux-mips.org: Thomas' original patch fixed the issue only for
 Yosemite but the same bug exists also in Emma.]

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Patchwork: https://patchwork.linux-mips.org/patch/2861/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/emma/common/prom.c
arch/mips/pmc-sierra/yosemite/prom.c