]> git.baikalelectronics.ru Git - kernel.git/commit
initcalls: Fix m68k build and possible buffer overflow
authorCyrill Gorcunov <gorcunov@gmail.com>
Thu, 15 May 2008 20:52:41 +0000 (13:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 May 2008 01:20:06 +0000 (18:20 -0700)
commit27d04e7c73e15c669efcee9ea6f0d4b8a446ad47
treeeb9e9b10f8b500bdf55831e780a2658a2486b715
parentb523b19ac64ad8ac70b237dec6a33cee3df608d6
initcalls: Fix m68k build and possible buffer overflow

This patch fixes a build bug on m68k - gcc decides to emit a call to the
strlen library function, which we don't implement.

More importantly - my previous patch "init: don't lose initcall return
values" (commit bcbfd591cc02617293e240092bc43059a40dca0a) had introduced
potential buffer overflow by wrong calculation of string accumulator
size.

Use strlcat() instead, fixing both bugs.

Many thanks Andreas Schwab and Geert Uytterhoeven for helping
to catch and fix the bug.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/main.c