From 6dbd8d0aae9404fa1c3e57f11917ac3c0f1156e8 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 8 May 2018 23:08:54 -0400 Subject: [PATCH 1/2] Fix stage2_args_t mismatch --- fusee/fusee-primary/src/stage2.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/fusee/fusee-primary/src/stage2.h b/fusee/fusee-primary/src/stage2.h index f5fc22b34..632bacd29 100644 --- a/fusee/fusee-primary/src/stage2.h +++ b/fusee/fusee-primary/src/stage2.h @@ -21,9 +21,6 @@ typedef struct { typedef struct { uint32_t version; - uint32_t *lfb; - uint32_t console_row; - uint32_t console_col; char bct0[BCTO_MAX_SIZE]; } stage2_args_t; From 290fb356a16d68968922f1690dea28fe1a771aef Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 8 May 2018 23:24:10 -0400 Subject: [PATCH 2/2] stage2: fix init malloc size for stage2_args_t --- fusee/fusee-primary/src/init.c | 2 +- fusee/fusee-secondary/src/init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fusee/fusee-primary/src/init.c b/fusee/fusee-primary/src/init.c index a0221aba0..a121310e4 100644 --- a/fusee/fusee-primary/src/init.c +++ b/fusee/fusee-primary/src/init.c @@ -90,7 +90,7 @@ static void __program_parse_argc_argv(int argc, char *argdata) { strcpy((char *)__program_argv[0], argdata); pos += len + 1; - __program_argv[1] = malloc(len + 1); + __program_argv[1] = malloc(sizeof(stage2_args_t)); if (__program_argv[1] == NULL) { generic_panic(); } diff --git a/fusee/fusee-secondary/src/init.c b/fusee/fusee-secondary/src/init.c index a0221aba0..a121310e4 100644 --- a/fusee/fusee-secondary/src/init.c +++ b/fusee/fusee-secondary/src/init.c @@ -90,7 +90,7 @@ static void __program_parse_argc_argv(int argc, char *argdata) { strcpy((char *)__program_argv[0], argdata); pos += len + 1; - __program_argv[1] = malloc(len + 1); + __program_argv[1] = malloc(sizeof(stage2_args_t)); if (__program_argv[1] == NULL) { generic_panic(); }