ntdll: Do not segfault with snoop for files with a broken exporttable

Dmitry Timoshkov dmitry at codeweavers.com
Sat Sep 8 23:02:48 CDT 2007


"Detlef Riekenberg" <wine.dev at web.de> wrote:

> ntdll: Do not segfault with snoop for files with a broken export table

> +    /* Check for files with broken exports */
> +    if (exports->Characteristics ||
> +        exports->MajorVersion || 
> +        HIWORD(exports->NumberOfFunctions) ||
> +        HIWORD(exports->NumberOfNames)) {
> +        WARN_(snoop)("snoop disabled for bad module %p: 0x%x, %u, 0x%x, 0x%x\n", hmod,
> +            exports->Characteristics, exports->MajorVersion,
> +            exports->NumberOfFunctions, exports->NumberOfNames);
> +        return;
> +    }
> +
>      TRACE_(snoop)("hmod=%p, name=%s\n", hmod, name);

It's still helpful to see the line "hmod=%p, name=%s\n" in the log before
an error message.

-- 
Dmitry.



More information about the wine-devel mailing list