Commit a426af80 authored by Tobias Stoeckmann's avatar Tobias Stoeckmann Committed by derf
Browse files

Fix out of boundary access on illegal argument

Calling feh with an empty argument leads to out of boundary access.
This can be seen best when compiled with asan:

$ feh ""
parent 728334b0
Loading
Loading
Loading
Loading
+1 −1
Changes for src/filelist.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ void add_file_to_filelist_recursively(char *origpath, unsigned char level)
	struct stat st;
	char *path;

	if (!origpath)
	if (!origpath || *origpath == '\0')
		return;

	path = estrdup(origpath);