From b4f834d462e8a469751abe4640ead5c96dccb91d Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Thu, 26 May 2011 12:05:10 +0200 Subject: [PATCH] Fix segmentation fault in extension checking --- utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.c b/utils.c index dd37079..43511a8 100644 --- a/utils.c +++ b/utils.c @@ -57,6 +57,10 @@ file_valid_extension(zathura_t* zathura, const char* path) const char* file_extension = file_get_extension(path); + if (file_extension == NULL) { + return false; + } + girara_list_iterator_t* iter = girara_list_iterator(zathura->plugins.plugins); if (iter == NULL) { return false;