1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

c++-analyzer finds the speck but misses the log.

modified:   p_mach.cpp
This commit is contained in:
John Reiser 2016-10-09 09:34:33 -07:00
parent ca2293f6d3
commit 9dd0e3ce4f

View File

@ -661,7 +661,7 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
segXHDR.filesize = offLINK - segTEXT.filesize; // XXX FIXME: assumes no __DATA in stub; segXHDR.filesize = offLINK - segTEXT.filesize; // XXX FIXME: assumes no __DATA in stub;
segXHDR.maxprot = Mach_segment_command::VM_PROT_READ; segXHDR.maxprot = Mach_segment_command::VM_PROT_READ;
segXHDR.nsects = 0; segXHDR.nsects = 0;
if (0) { // replace __DATA with segXHDR if (!segtxt) { // replace __DATA with segXHDR
memcpy(tail, &segXHDR, sizeof(segXHDR)); memcpy(tail, &segXHDR, sizeof(segXHDR));
tail += sizeof(segXHDR); tail += sizeof(segXHDR);
goto next; goto next;