]> 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>
Thu, 3 Nov 2011 21:15:04 +0000 (21:15 +0000)
commite8cbccbdc9e2cd05e95d85a436790eb8fa84f5f1
treecd920557c1ace0d9655ec5b7be04287e903c296c
parent899e3ee404961a90b828ad527573aaaac39f0ab1
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