From: Jaroslav Kysela Date: Sun, 1 Jun 2014 19:37:42 +0000 (+0200) Subject: imagecache: check for null/empty url X-Git-Tag: v4.1~2017 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dc13eb178f7c7edbd72a1151f684baf0c113079;p=thirdparty%2Ftvheadend.git imagecache: check for null/empty url --- diff --git a/src/imagecache.c b/src/imagecache.c index f9f40ef19..aa9930a48 100644 --- a/src/imagecache.c +++ b/src/imagecache.c @@ -142,7 +142,8 @@ imagecache_image_fetch ( imagecache_image_t *img ) tvhpoll_t *efd = NULL; http_client_t *hc; - memset(&url, 0, sizeof(url)); + if (img->url == NULL || img->url[0] == '\0') + return res; /* Open file */ if (hts_settings_buildpath(path, sizeof(path), "imagecache/data/%d", @@ -423,7 +424,7 @@ imagecache_get_id ( const char *url ) lock_assert(&global_lock); /* Invalid */ - if (!url) + if (!url || url[0] == '\0') return 0; /* Disabled */