1
0
mirror of https://github.com/glennrp/libpng.git synced 2026-10-24 08:39:18 +03:00
Files
libpng/tests/pnggetset
Cosmin Truta 398cbe3df0 fix: Handle self-referencing pointers in getter-to-setter aliasing
Apply a robustness fix for a caller-side API usage pattern involving
the getters and the setters for PLTE, tRNS, and hIST.

Passing a pointer returned by the PLTE, tRNS, or hIST getters back
into the corresponding setters used to cause the setters to read from
a stale pointer. The fix consists in snapshotting the caller's data
into a stack-local buffer before freeing the old internal storage.

Fixes pnggroup/libpng#836

Reported-by: Iv4n <Iv4n550@noreply.github.com>
2026-03-30 17:35:30 +03:00

6 lines
101 B
Bash
Executable File

#!/bin/sh
# pnggetset test:
# Getter-to-setter roundtrips for various chunk types.
exec ./pnggetset