From 982c6afbdf0ad55822c1ed43003f23226c1eafae Mon Sep 17 00:00:00 2001 From: hpa Date: Wed, 16 Apr 2003 04:17:39 +0000 Subject: [PATCH] Fix memory computation error for MEMDISK --- NEWS | 3 +++ memdisk/setup.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6067bcc..ff57712 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ Changes in 2.04: * SYSLINUX: Resurrect the old no-mtools version of the installer, although as a root-only tool. Some distributors have indicated that they need a small standalone installer. + * MEMDISK: Fix a memory offset computation error when + installing compressed disks which generally would cause + 1 MB of memory to be wasted. Changes in 2.03: * Actually support comment lines in the configuration file. diff --git a/memdisk/setup.c b/memdisk/setup.c index e9303ec..524f3a4 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -1,7 +1,7 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * * - * Copyright 2001-2002 H. Peter Anvin - All Rights Reserved + * Copyright 2001-2003 H. Peter Anvin - All Rights Reserved * * 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 @@ -247,7 +247,7 @@ void unzip_if_needed(uint32_t *where_p, uint32_t *size_p) if ( startrange <= (-gzdatasize) && ranges[i].type == 1 && endrange - startrange >= gzdatasize ) { - end_mem = endrange - ranges[i].start; + end_mem = (uint32_t)endrange; okmem = 1; } } -- 2.7.4