]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
image-sgi: Return early if sgiOpenFile fails 647/head
authorGünther Noack <gnoack@google.com>
Fri, 4 Jul 2025 14:15:42 +0000 (16:15 +0200)
committerGünther Noack <gnoack@google.com>
Tue, 8 Jul 2025 17:18:03 +0000 (19:18 +0200)
commitd43610f82e1757b45925a8830ac297ff9dc4abca
treea8317757bf0daf41bb73a421b2f91e02be1b0677
parent3c58463e341b12c9d30d7d3807d2bac1bc595a78
image-sgi: Return early if sgiOpenFile fails

sgiOpenFile can fail when passing an image that both has large
dimensions and which also uses RLE compression.  In that case,
sgiOpenFile attempts to allocate space for compression-related tables
and these allocations may fail due to the requested size, causing
sgiOpenFile to return NULL.  Without this fix, the NULL pointer gets
dereferenced, which crashes the filter process.

Compare https://en.wikipedia.org/wiki/Silicon_Graphics_Image#Header
for an overview of the SGI image headere.
cupsfilters/image-sgi.c