diff options
author | 2011-01-30 21:41:44 +0100 | |
---|---|---|
committer | 2011-03-14 21:07:26 +0100 | |
commit | 994fed2dd2166f86b62ec53c7424660145f138ee (patch) | |
tree | 693b4a0483d0a4ec10a4b2ab911213c4b892b7a2 /fs/jbd2/commit.c | |
parent | MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c (diff) | |
download | linux-rng-994fed2dd2166f86b62ec53c7424660145f138ee.tar.xz linux-rng-994fed2dd2166f86b62ec53c7424660145f138ee.zip |
MIPS: Loongson: Fix potentially wrong string handling
This error was reported by cppcheck:
arch/mips/loongson/common/machtype.c:56: error: Dangerous usage of 'str' (strncpy doesn't always 0-terminate it)
If strncpy copied MACHTYPE_LEN bytes, the destination string str
was not terminated.
The patch adds one more byte to str and makes sure that this byte is
always 0.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Arnaud Patard <apatard@mandriva.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/2053/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions