--- xfdesktop-orig/common/xfdesktop-common.c 2010-07-02 23:44:32.165943575 -0400 +++ xfdesktop/common/xfdesktop-common.c 2010-07-02 23:58:30.458989386 -0400 @@ -23,6 +23,7 @@ #endif #include +#include #ifdef HAVE_FCNTL_H #include @@ -277,6 +278,13 @@ fd = open(filename, O_RDONLY|O_BINARY); if(fd < 0) return FALSE; + + /* just because we can open you doesn't mean your a real image */ + int status; + struct stat st_buf; + status = stat(filename, &st_buf); + if (S_ISDIR (st_buf.st_mode)) + return FALSE; loader = gdk_pixbuf_loader_new(); g_signal_connect(G_OBJECT(loader), "size-prepared",