Skip to content

Commit

Permalink
x86, kaslr: Use char array to gain sizeof sanity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kees Cook authored and H. Peter Anvin committed Nov 12, 2013
1 parent e8236c4 commit 327f7d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/boot/compressed/aslr.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/version.h>

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

#define I8254_PORT_CONTROL 0x43
Expand Down

0 comments on commit 327f7d7

Please sign in to comment.