aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-02-04 11:38:07 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-04 11:38:07 -0800
commit52443dc7dc5a203d053b70e870e6b83986ebb530 (patch)
tree1bef6e55262a8813e3497138cb14832299dc1a87
parentc3b4e4408688d150da5da74b15b5dba773ff3f28 (diff)
downloadsyslinux-52443dc7dc5a203d053b70e870e6b83986ebb530.tar.gz
syslinux-52443dc7dc5a203d053b70e870e6b83986ebb530.tar.xz
syslinux-52443dc7dc5a203d053b70e870e6b83986ebb530.zip
load_linux: bail if no place for the real mode portion is found
Bail in the case of no space for the real mode code. This can happen mostly for zImage kernels when the conventional memory ceiling is too low. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--com32/lib/syslinux/load_linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index f67c2e4f..471d8a50 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -390,6 +390,9 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
break;
}
}
+
+ if (!ok)
+ goto bail;
}
if (syslinux_add_movelist(&fraglist, real_mode_base, (addr_t) kernel_buf,