summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-28 17:41:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-28 17:41:02 +0200
commit9c5b74ae8e8fc758a949263d218949cfd33d8974 (patch)
treebf4f905cc58891ab4219ac9ea456336e803fd3e4 /src
parent2963a156abf75542a3171dad45ddc9bcce2eb37f (diff)
feh_wm_set_bg: .fehbg: Do not overflow filbuf by writing too many filenames
Diffstat (limited to 'src')
-rw-r--r--src/wallpaper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c
index 8a2a979..930e52e 100644
--- a/src/wallpaper.c
+++ b/src/wallpaper.c
@@ -278,7 +278,7 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
filbuf[out++] = '\'';
} else {
- for (l = filelist; l; l = l->next) {
+ for (l = filelist; l && out < 4092; l = l->next) {
filbuf[out++] = '\'';
fil = FEH_FILE(l->data)->filename;