]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: fix /redir URL crash
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 Jun 2015 06:50:10 +0000 (08:50 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 Jun 2015 06:50:10 +0000 (08:50 +0200)
src/webui/webui.c

index be959479ea39e21c2a39da4073507390dc536eec..c4685f965dbada5313ae500fbd0b5d9a79940ba2 100644 (file)
@@ -1435,6 +1435,8 @@ http_redir(http_connection_t *hc, const char *remain, void *opaque)
   char buf[256];
   int nc;
 
+  if (!remain)
+    return HTTP_STATUS_BAD_REQUEST;
   nc = http_tokenize((char *)remain, components, 3, '/');
   if(!nc)
     return HTTP_STATUS_BAD_REQUEST;