Commit 97dd0dfa by Ian Lance Taylor

* pecoff.c (coff_add): Another memcpy -> coff_read4 fix.

Updates #11
parent 4300eeda
...@@ -631,10 +631,10 @@ coff_add (struct backtrace_state *state, int descriptor, ...@@ -631,10 +631,10 @@ coff_add (struct backtrace_state *state, int descriptor,
goto fail; goto fail;
{ {
const char *vptr = (const char *)fhdr_view.data; const unsigned char *vptr = fhdr_view.data;
if (vptr[0] == 'M' && vptr[1] == 'Z') if (vptr[0] == 'M' && vptr[1] == 'Z')
memcpy (&fhdr_off, vptr + 0x3c, 4); fhdr_off = coff_read4 (vptr + 0x3c);
else else
fhdr_off = 0; fhdr_off = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment