Permalink
Browse files

Verify all 4 bytes of PE signature.

  • Loading branch information...
jaykrell authored and marek-safar committed Apr 12, 2018
1 parent 7cc9327 commit 95dc93543d74ca1fc2de85baa6d53f9a872577fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 mono/metadata/image.c
View
@@ -840,7 +840,7 @@ do_load_header (MonoImage *image, MonoDotNetHeader *header, int offset)
memcpy (header, image->raw_data + offset, sizeof (MonoDotNetHeader));
if (header->pesig [0] != 'P' || header->pesig [1] != 'E')
if (header->pesig [0] != 'P' || header->pesig [1] != 'E' || header->pesig [2] || header->pesig [3])
return -1;
/* endian swap the fields common between PE and PE+ */

0 comments on commit 95dc935

Please sign in to comment.