Files
imhex/plugins
paxcut 5ea021d57a fix: fix for issue 2334 (#2337)
The error was that if `m_bytesPerRow` was not divisible by the number of
bytes per column then ImHex would crash but wouldn't crash if it was.
When `m_bytesPerRow` is not equal to the resultant bytes per row
obtained by the product of column count and bytes per column, then the
later bytes per row were be allocated but the former bytes per row were
being written causing heap corruption and crashes.

Instead of resetting `m_bytePerRow` when it can't be used, a new
variable (`bytesPerRow`) is created with the correct value and used in
the rest of the function. This way if the user goes back to choose a
data size that divides the old `m_bytesPerRow` then the number would
still be available and not overwritten. Test indicate that this approach
works and previous crashes are eliminated while producing the desired
output.
2025-07-15 23:55:52 -07:00
..
2025-07-10 13:57:08 +02:00
2025-06-24 02:02:42 -07:00
2025-07-10 13:57:08 +02:00
2025-06-24 02:02:42 -07:00
2025-07-10 13:57:08 +02:00
2025-07-15 23:55:52 -07:00
2025-07-10 13:57:08 +02:00
2025-06-24 02:02:42 -07:00
2025-07-10 13:57:08 +02:00