mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
3e0ddf70e9
The metal boot sector code was wrapped in a single-quoted string, like so: MZqFpD=' ...MZ HEADER... ...E_LFANEW... ...BIOS BOOT SECTOR...' This might break the shell code loader if the boot sector code contains a 0x27 (single quote) byte. This patch wraps the boot sector code in a here-document instead: MZqFpD=' ...MZ HEADER...' <<'@' ...E_LFANEW... ...BIOS BOOT SECTOR... @ This is harder to break — when interpreted as a shell script, the code can only accidentally terminate the here-document if there is a "\n@\n" sequence inside the BIOS boot portion. |
||
---|---|---|
.. | ||
public | ||
ape.lds | ||
ape.mk | ||
ape.S | ||
apeinstall.sh | ||
apeuninstall.sh | ||
config.h | ||
idata.internal.h | ||
loader-elf.S | ||
loader-macho.lds | ||
loader-macho.S | ||
loader.c | ||
loader.h | ||
loader.lds | ||
macros.internal.h | ||
mz.ansi | ||
notice.inc | ||
relocations.h |