From e01f0b9514b0322cd986113d1c6e008f7c4a5163 Mon Sep 17 00:00:00 2001 From: okuji Date: Fri, 14 Jul 2000 07:48:13 +0000 Subject: [PATCH] fix a big linux problem. --- ChangeLog | 5 +++++ THANKS | 1 + stage2/boot.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43f93a776..8f2b6a694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-14 Khimenko Victor + + * stage2/boot.c (load_image): When getting the text length of a + Linux kernel, use unsigned long instead of unsigned short. + 2000-07-13 OKUJI Yoshinori * lib/device.c: Include errno.h. Reported by Thierry DELHAISE diff --git a/THANKS b/THANKS index 68d9cfe94..fa8e2834c 100644 --- a/THANKS +++ b/THANKS @@ -26,6 +26,7 @@ Johannes Kroeger John Tobey Josip Rodin Kalle Olavi Niemitalo +Khimenko Victor Klaus Reichl Kunihiro Ishiguro Mark Lundeberg diff --git a/stage2/boot.c b/stage2/boot.c index 831e41849..eefbeddaf 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -2,7 +2,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1996 Erich Boleyn - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -207,7 +207,7 @@ load_image (char *kernel, char *arg, kernel_t suggested_type, (buffer + LINUX_SETUP_LEN_OFFSET))) << 9)) <= LINUX_SETUP_MAXLEN) && ((text_len - = (((long) *((unsigned short *) + = (((long) *((unsigned long *) (buffer + LINUX_KERNEL_LEN_OFFSET))) << 4)), (data_len + text_len + SECTOR_SIZE) <= ((filemax + 15) & 0xFFFFFFF0))) {