From b3dd49f09630ec1338d2ee987f794d49ca01c227 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Wed, 23 Jan 2013 13:24:36 +0000 Subject: [PATCH] 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 Signed-off-by: Matt Fleming --- com32/hdt/hdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com32/hdt/hdt.c b/com32/hdt/hdt.c index 653995d..67b3ab0 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); -- 2.7.4