summaryrefslogtreecommitdiff
path: root/util_lib/include
diff options
context:
space:
mode:
authorWang YanQing <udknight@gmail.com>2013-04-08 17:23:25 +0800
committerSimon Horman <horms@verge.net.au>2013-04-17 09:10:16 +0900
commit030065eef1ef277211642e0b6ff46ff489ef6677 (patch)
tree2bf18b3b49c3d37694d494293242bdfe23d31e21 /util_lib/include
parentac650465afb1a1721f6d5d9fb6f1d275b1a0c194 (diff)
kexec:i386/kexec-[bzImage|elf-x86]:x86_64/kexec-bzImage64: Use "\0" as command line instead of empty command line
This patch prevents the problems to happen below: In setup_linux_bootloader_parameters_high 120 cmdline_ptr = ((char *)real_mode) + cmdline_offset; 121 memcpy(cmdline_ptr, cmdline, cmdline_len); 122 cmdline_ptr[cmdline_len - 1] = '\0'; if cmdline_len == 0, Line 122 will corrupt kernel16 buf just before the commandline. And in do_bzImage_load, for example, 369 cmdline_end = setup_base + kern16_size_needed + command_line_len - 1; 370 elf_rel_set_symbol(&info->rhdr, "cmdline_end", &cmdline_end, 371 sizeof(unsigned long)); Line 369 will go wrong, too. Signed-off-by: Wang YanQing <udknight@gmail.com> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'util_lib/include')
0 files changed, 0 insertions, 0 deletions