On Fri Mar 20 08:13:15 2026 +0000, Zhiyi Zhang wrote:
v2: Limit the initial image count to 256. Adding some tests for Write/Load shows that it's behaving weirder than it needs to. For some combinations it's setting cMaxImage lower than current image count. Might be some estimation based on "some" memory allowance divided by individual image size. Also, cMaxImage is serialized as 16 bit int, same for current count, so arguments larger than that are already out of bounds probably. This behavior is also different on v6, where it seems to store argument value as is (unless there is something going on with our tests on v6).
Anyway, this does not look important to spend time on. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10382#note_132955