Ryan Mansfield 295a3f7251
[yaml2obj][MachO] Fix crash from integer underflow with invalid cmdsize (#165924)
yaml2obj would crash when processing Mach-O load commands with cmdsize
smaller than the actual structure size e.g. LC_SEGMENT_64 with
cmdsize=56 instead of 72. The crash occurred due to integer underflow
when calculating padding: cmdsize - BytesWritten wraps to a large value
when negative, causing a massive allocation attempt.
2025-11-13 09:31:37 +00:00
..