kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=3e1783b846a0749dd212100fec6b2d5a60f87509

commit 3e1783b846a0749dd212100fec6b2d5a60f87509
Author: Kim Woelders <[email protected]>
Date:   Sun Oct 3 21:03:21 2021 +0200

    XBM loader: Fix potential buffer overrun
---
 src/modules/loaders/loader_xbm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/loaders/loader_xbm.c b/src/modules/loaders/loader_xbm.c
index af8b21c..251a238 100644
--- a/src/modules/loaders/loader_xbm.c
+++ b/src/modules/loaders/loader_xbm.c
@@ -141,11 +141,14 @@ load2(ImlibImage * im, int load_data)
 
                        x = 0;
                        y += 1;
+                       if (y >= im->h)
+                          goto done;
                     }
                }
           }
      }
 
+ done:
    rc = LOAD_SUCCESS;
 
  quit:

-- 


Reply via email to