diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-01-23 13:24:36 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-01-23 15:05:28 +0000 |
commit | b3dd49f09630ec1338d2ee987f794d49ca01c227 (patch) | |
tree | a622cd2e74f403642a7dd2c30a949780081606e8 | |
parent | 4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e (diff) | |
download | syslinux-b3dd49f09630ec1338d2ee987f794d49ca01c227.tar.gz syslinux-b3dd49f09630ec1338d2ee987f794d49ca01c227.tar.xz syslinux-b3dd49f09630ec1338d2ee987f794d49ca01c227.zip |
hdt: Move ~162K byte data object from the stack to the bss
A struct s_hardware is far too large to be placed onto the stack and
was causing us run past the end of the allocated stack and overwrite
the diskcache, which resulted in apparent file system corruption.
Move this hefty object into the bss.
Cc: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/hdt/hdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/hdt/hdt.c b/com32/hdt/hdt.c index 653995d0..67b3ab0c 100644 --- a/com32/hdt/hdt.c +++ b/com32/hdt/hdt.c @@ -48,7 +48,7 @@ int max_console_lines = MAX_CLI_LINES; int main(const int argc, const char *argv[]) { char version_string[256]; - struct s_hardware hardware; + static struct s_hardware hardware; snprintf(version_string, sizeof version_string, "%s %s (%s)", PRODUCT_NAME, VERSION, CODENAME); |