Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 97dd0df

Browse files
* pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
Updates ianlancetaylor#11
1 parent 4300eed commit 97dd0df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pecoff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,10 @@ coff_add (struct backtrace_state *state, int descriptor,
631631
goto fail;
632632

633633
{
634-
const char *vptr = (const char *)fhdr_view.data;
634+
const unsigned char *vptr = fhdr_view.data;
635635

636636
if (vptr[0] == 'M' && vptr[1] == 'Z')
637-
memcpy (&fhdr_off, vptr + 0x3c, 4);
637+
fhdr_off = coff_read4 (vptr + 0x3c);
638638
else
639639
fhdr_off = 0;
640640
}

0 commit comments

Comments
 (0)