diff options
author | Kees Cook <keescook@chromium.org> | 2013-11-12 11:56:07 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-11-12 11:58:35 -0500 |
commit | 327f7d72454aecdc7a4a1c847a291a3f224b730f (patch) | |
tree | e9012b05ecec74140256e62ca7d1a4388cd46198 | |
parent | e8236c4d9338d52d0f2fcecc0b792ac0542e4ee9 (diff) |
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>
-rw-r--r-- | arch/x86/boot/compressed/aslr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 38a07cc4fbac..84be1752dcd8 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/version.h> | 13 | #include <linux/version.h> |
14 | 14 | ||
15 | /* Simplified build-specific string for starting entropy. */ | 15 | /* 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 "@" |
17 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; | 17 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; |
18 | 18 | ||
19 | #define I8254_PORT_CONTROL 0x43 | 19 | #define I8254_PORT_CONTROL 0x43 |