2003-01-29 Yoshinori K. Okuji <okuji@enbug.org>
From Ilguiz Latypov: * configure.in: Fix a syntax error in a sed script. * stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0 for ZF Micro might understand the greater buffer size for the "get drive parameters" int 0x13 call in its own way. Supposedly the BIOS assumes even bigger space is available and thus corrupts the stack. This is why we specify the exactly necessary size of 0x42 bytes.
This commit is contained in:
parent
3e41ca492a
commit
da7278fc6d
4 changed files with 23 additions and 5 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2003-01-29 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
From Ilguiz Latypov:
|
||||
* configure.in: Fix a syntax error in a sed script.
|
||||
* stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0
|
||||
for ZF Micro might understand the greater buffer size for the
|
||||
"get drive parameters" int 0x13 call in its own way.
|
||||
Supposedly the BIOS assumes even bigger space is available and
|
||||
thus corrupts the stack. This is why we specify the exactly
|
||||
necessary size of 0x42 bytes.
|
||||
|
||||
2003-01-25 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
From Steven Dick <ssd.gnu@mmae.ucf.edu>:
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -2918,7 +2918,7 @@ fi
|
|||
if test "x$ac_cv_c_compiler_gnu" = xyes; then
|
||||
if test "x$default_CFLAGS" = xyes; then
|
||||
# Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
|
||||
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]/g'` -g"
|
||||
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]//g'` -g"
|
||||
# If the user specify the directory for binutils, add the option `-B'.
|
||||
if test "x$with_binutils" != x; then
|
||||
CFLAGS="-B$with_binutils/ $CFLAGS"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
dnl Configure script for GRUB.
|
||||
dnl Copyright 1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
dnl Copyright 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
|
||||
|
||||
dnl Permission to use, copy, modify and distribute this software and its
|
||||
dnl documentation is hereby granted, provided that both the copyright
|
||||
|
@ -78,7 +78,7 @@ fi
|
|||
if test "x$ac_cv_prog_gcc" = xyes; then
|
||||
if test "x$default_CFLAGS" = xyes; then
|
||||
# Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
|
||||
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]/g'` -g"
|
||||
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]//g'` -g"
|
||||
# If the user specify the directory for binutils, add the option `-B'.
|
||||
if test "x$with_binutils" != x; then
|
||||
CFLAGS="-B$with_binutils/ $CFLAGS"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* bios.c - implement C part of low-level BIOS disk input and output */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2000,2003 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
|
||||
|
@ -169,7 +169,14 @@ get_diskinfo (int drive, struct geometry *geometry)
|
|||
/* It is safe to clear out DRP. */
|
||||
grub_memset (&drp, 0, sizeof (drp));
|
||||
|
||||
drp.size = sizeof (drp);
|
||||
/* PhoenixBIOS 4.0 Revision 6.0 for ZF Micro might understand
|
||||
the greater buffer size for the "get drive parameters" int
|
||||
0x13 call in its own way. Supposedly the BIOS assumes even
|
||||
bigger space is available and thus corrupts the stack.
|
||||
This is why we specify the exactly necessary size of 0x42
|
||||
bytes. */
|
||||
drp.size = sizeof (drp) - sizeof (drp.dummy);
|
||||
|
||||
err = get_diskinfo_int13_extensions (drive, &drp);
|
||||
if (! err)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue