Merge branch 'devel' into jreiser-macho

This commit is contained in:
John Reiser
2017-12-26 10:41:26 -08:00
8 changed files with 681 additions and 607 deletions
+1 -1
View File
@@ -1485,7 +1485,7 @@ void PackMachBase<T>::unpack(OutputFile *fo)
memcpy(&msegcmd[j], ptr, umin(sizeof(Mach_segment_command),
((Mach_command const *)ptr)->cmdsize));
ptr += (unsigned) ((Mach_command const *)ptr)->cmdsize;
if (ptr_udiff(ptr, mhdr) > ph.u_len) {
if (ptr_udiff(ptr, (1+ mhdr)) > ph.u_len) {
throwCantUnpack("cmdsize");
}
}