[Nasm-bugs] [Bug 3392751] Read of Uninitialized Value on calcsize (asm/assemble.c)

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sun May 2 23:50:30 PDT 2021


Marco <mvanotti at protonmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |mvanotti at protonmail.com

--- Comment #1 from Marco <mvanotti at protonmail.com> ---
The error here seems to be in this if condition:

if (process_ea(opy, &ea_data, bits,
               rfield, rflags, ins, &errmsg) != eat) {
    nasm_nonfatal("%s", errmsg);
    return -1;

The function process_ea only populates the errmsg in the case of an error
(which would be signalled by returning EA_INVALID). In the program above, it
returns an ea_type that is not EA_INVALID, it is EA_XMMVSIB, so the error
message ptr is not set.

A solution could be to check if the result is EA_INVALID, and then print the
error, and print a different error if it is not EAT, not populating errmsg.

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