[Git][wine/wine][master] 2 commits: windowscodecs: Fix decoding GIFs that fill the LZW code table.
Alexandre Julliard pushed to branch master at wine / wine Commits: 89b35d3f by Marius Kamm at 2026-06-22T18:50:30+02:00 windowscodecs: Fix decoding GIFs that fill the LZW code table. The GIF LZW decompressor writes a new table entry at index RunningCode-2 for every code while LastCode != NO_SUCH_CODE. Once the table is full, DGifDecompressInput freezes RunningCode at LZ_MAX_CODE+2, so RunningCode-2 stays at 4095 and every subsequent code overwrites the already-valid entry 4095. For a GIF that fills the 4096-entry table and keeps emitting codes before a clear code, a later code whose prefix chain runs through the corrupted entry then produces CrntPrefix > LZ_MAX_CODE / j >= LZ_MAX_CODE, so DGifDecompressLine returns GIF_ERROR and the whole image fails to load. Native Windows decodes such files correctly. Only define a table entry while it is still empty, matching giflib, which keeps the full table intact until a clear code arrives. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59887 - - - - - c7929af7 by Marius Kamm at 2026-06-22T18:50:30+02:00 windowscodecs/tests: Test decoding a GIF that fills the LZW code table. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59887 - - - - - 2 changed files: - dlls/windowscodecs/tests/gifformat.c - dlls/windowscodecs/ungif.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/84f282bd2ada40944dce73ded25610... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/84f282bd2ada40944dce73ded25610... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)