From bc57f17d6288241ae8728fb686811a6754dd6b03 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Mon, 9 Sep 2019 18:14:48 -0700 Subject: [PATCH] Fixed bug in nedasm related to uninitialized size of text_segment array. --- nedasm/nedasm_codegen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nedasm/nedasm_codegen.c b/nedasm/nedasm_codegen.c index ddfd792..a4e9609 100644 --- a/nedasm/nedasm_codegen.c +++ b/nedasm/nedasm_codegen.c @@ -229,6 +229,7 @@ generate_code(struct instruction * instructions, FILE * output) uint32_t * text_segment = malloc((max_word_count * sizeof(uint32_t)) + 1); struct nlist * symbol_table = malloc(label_count * sizeof(struct nlist)); + text_segment[0] = 0; uint8_t syllable_count = 0; uint32_t temp_word = 0; -- 2.20.1