MIPS: Yosemite, Emma: Fix off-by-two in arcs_cmdline buffer size checkmaster
commitdb25fb4fdd974f72d41606a5a1ca177077c17b2c
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 29 Oct 2011 13:45:56 +0000 (29 15:45 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 2 Nov 2011 13:18:03 +0000 (2 13:18 +0000)
treecaa5dc2ed4e3fcc1283d28fb15a81e51a063d3e1
parent296bbd9e6af67fc46aa1751735e24623f74dbb6c
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