Commit 45f3ab19 by Ian Lance Taylor Committed by Ian Lance Taylor

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

From-SVN: r257052
parent 3d8fb311
2018-01-25 Ian Lance Taylor <iant@golang.org>
* pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
2018-01-24 Ian Lance Taylor <iant@golang.org> 2018-01-24 Ian Lance Taylor <iant@golang.org>
* pecoff.c (coff_add): Use coff_read4, not memcpy. * pecoff.c (coff_add): Use coff_read4, not memcpy.
......
...@@ -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