From f8d3c34307ffd8a2793bff71a7a2522e4e6d3925 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Tue, 14 Sep 2021 16:38:57 +0200 Subject: [PATCH] avoid possible segfault --- src/eitd/xmlutil.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index 29e451f72..0225ec941 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -677,8 +677,11 @@ void *insertEventsfromXMLTV(void * data) } else if (::downloadUrl(url, tmp_name)) { - readEventsFromXMLTV(tmp_name, ev_count); - remove(tmp_name.c_str()); + if (!access(tmp_name.c_str(), R_OK)) + { + readEventsFromXMLTV(tmp_name, ev_count); + remove(tmp_name.c_str()); + } } else {