From 9c5b74ae8e8fc758a949263d218949cfd33d8974 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 28 Sep 2011 17:41:02 +0200 Subject: feh_wm_set_bg: .fehbg: Do not overflow filbuf by writing too many filenames --- src/wallpaper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3