This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 1bc95a863174dc24bacdca2d28b094540c601eed
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Wed Mar 20 19:36:44 2024 +0100

    XPM loader: Fix potential segv on malformed file
    
    Introduced by 6ea4cf7e66685d399e60ca9f14236827b1fa4374, in v1.6.0.
    
    https://git.enlightenment.org/old/legacy-imlib2/issues/22
---
 src/modules/loaders/loader_xpm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/loaders/loader_xpm.c b/src/modules/loaders/loader_xpm.c
index 2f6e872..4763210 100644
--- a/src/modules/loaders/loader_xpm.c
+++ b/src/modules/loaders/loader_xpm.c
@@ -442,6 +442,9 @@ _load(ImlibImage *im, int load_data)
             done = 1;
     }
 
+    if (!im->data || !cmap)
+        goto quit;
+
     for (; count < pixels; count++)
     {
         /* Fill in missing pixels

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to