[Nasm-bugs] [Bug 3392775] uninitialized value use

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sun Oct 17 13:56:06 PDT 2021


https://bugzilla.nasm.us/show_bug.cgi?id=3392775

--- Comment #4 from Andrew Bao <xiaobaozidi at gmail.com> ---
Hi Cyrill,
This bug happenes in function assmeble_file() in asm/nasm.c

1622 static void assemble_file(const char *fname, struct strlist *depend_list)
1623 {
1624     char *line;
1625     insn output_ins;
1626     uint64_t prev_offset_changed;
1627     int64_t stall_count = 0; /* Make sure we make forward progress... */

I guess for this bug, the reason is when output_ins is allocated, we should
memset it in the first place.

Suggested Fixed:
memset(&output_ins, 0, sizeof(insn));

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list