mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-01 10:15:21 +02:00
LoadZIMPtr() writes width[]/height[]/image[] as arrays (one entry per mip level, up to ZIM_MAX_MIP_LEVELS) whenever the file has ZIM_HAS_MIPS set, per its documented contract - but this caller passed plain scalar locals. A texture-replacement .zim file with that flag set caused multiple out-of-bounds stack writes. Now passes properly sized arrays and only uses level 0, matching the existing "we don't support ZIM mips yet" behavior. Also fixes a pre-existing leak of image[0] on the "changed since header read" error path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L4QAoxV2KY7ek4PcZw3WvY