2002-03-26 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/boot.c (linux_mem_size): New variable.
	(load_image): Check a mem= option and set LINUX_MEM_SIZE to the
	specified memory size, if any. Otherwise, to zero. When an
	overflow is detected, use LINUX_INITRD_MAX_ADDRESS instead.
	(load_initrd): If LINUX_MEM_SIZE is non-zero, use it instead of
	the actual memory size.
	* stage2/char_io.c (safe_parse_maxint): Use ERR_NUMBER_OVERFLOW
	instead of ERR_NUMBER_PARSING, when an overflow occurs.
	* stage2/common.c [!STAGE1_5] (err_list): Added
	ERR_NUMBER_OVERFLOW.
	* stage2/shared.h (ERR_NUMBER_OVERFLOW): New constant.
This commit is contained in:
okuji committed 2002-03-25 21:43:55 +00:00
1 parent 3c5148ff24
commit 30ec0405c4
6 files changed
+85 -5

No files matched your search

+1 -1
View File
@@ -948,7 +948,7 @@ safe_parse_maxint (char **str_ptr, int *myint_ptr)
found = 1;
if (myint > ((MAXINT - digit) / mult))
{
errnum = ERR_NUMBER_PARSING;
errnum = ERR_NUMBER_OVERFLOW;
return 0;
}
myint = (myint * mult) + digit;