Skip to content

Commit 327f7d7

Browse files
keesH. Peter Anvin
authored andcommitted
x86, kaslr: Use char array to gain sizeof sanity
The build_str needs to be char [] not char * for the sizeof() to report the string length. Reported-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/r/20131112165607.GA5921@www.outflux.net Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 parent e8236c4 commit 327f7d7

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/boot/compressed

1 file changed

+1
-1
lines changed

arch/x86/boot/compressed/aslr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/version.h>
1414

1515
/* Simplified build-specific string for starting entropy. */
16-
static const char *build_str = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
16+
static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
1717
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
1818

1919
#define I8254_PORT_CONTROL 0x43

0 commit comments

Comments
 (0)