Replace remaining sprintf() with snprintf() by myagmartseren · Pull Request #9476 · python-pillow/Pillow
and others added 2 commits
March 19, 2026 16:53Replace unsafe sprintf() calls with bounds-checked snprintf() in: - src/libImaging/QuantPngQuant.c (version string) - src/libImaging/JpegEncode.c (version string) - src/_webp.c (error messages and version string, 4 call sites) This is consistent with the fix applied in CVE-2024-28219 which addressed the same class of vulnerability in font rendering code. Security: CWE-120 (Buffer Copy without Checking Size of Input)
aclark4life
changed the title
Replace remaining sprintf() with snprintf() (security)
Replace remaining sprintf() with snprintf()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters