The vulnerability is an integer overflow within the ReadPSDMergedImage function in coders/psd.c. Specifically, the multiplication of image->rows and psd_info->channels to determine the size of a buffer for RLE scanline data can overflow on 32-bit systems. This results in the allocation of an undersized buffer. The allocated buffer is subsequently used by the ReadPSDChannelRLE function, which is where the program crashes due to a heap out-of-bounds read, as evidenced by the provided stack trace. The patch addresses the root cause by adding an integer overflow check (HeapOverflowSanityCheckGetSize) in ReadPSDMergedImage before the buffer size is calculated and the allocation occurs. Therefore, both ReadPSDMergedImage (where the overflow originates) and ReadPSDChannelRLE (where the crash manifests) are critical functions that would appear in a runtime profile during exploitation.