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

git pushed a commit to branch master
in repository efl.

View the commit online.

commit e733f19644de0550c903b78d10c0a3b0140e448f
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Wed Oct 30 18:25:26 2024 +0000

    ethumb - do not try thumbnail a pipe, chr, block dir or socket file
    
    if you try ethumb thumbnail a pipe it leads to.. guess what? a hang!
    :) esp if nothing is writing to the pipe...
    
    @fix
---
 src/lib/ethumb/ethumb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 9df7453b31..7e9b20c8ed 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -1486,6 +1486,12 @@ _ethumb_image_load(Ethumb *e)
    int error;
    Evas_Coord w, h, ww, hh, fx, fy, fw, fh;
    Evas_Object *img;
+   struct stat st;
+
+   if (stat(e->src_path, &st) != 0) return 0;
+   if (S_ISDIR(st.st_mode) || S_ISFIFO(st.st_mode) ||
+       S_ISSOCK(st.st_mode) || S_ISBLK(st.st_mode) ||
+       S_ISCHR(st.st_mode)) return 0;
 
    img = e->img;
 

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

Reply via email to