]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: fix another crash caused by formatter code
authorJaroslav Kysela <perex@perex.cz>
Tue, 23 Feb 2016 15:02:02 +0000 (16:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 23 Feb 2016 15:02:02 +0000 (16:02 +0100)
src/dvr/dvr_rec.c

index 0e95f9edb27585b9f295e0d2ca7774d05ce6b285..f0a1290f23a874a01e535ee5053673185a0a9721 100644 (file)
@@ -289,7 +289,7 @@ static const char *
 dvr_do_prefix(const char *id, const char *s, char *tmp, size_t tmplen)
 {
   if (id[0] == '?') {
-    if (*s >= '0' && *s <= '9') {
+    if (s != NULL && *s >= '0' && *s <= '9') {
       char *endptr;
       long l = strtol(s, &endptr, 10);
       if (l && tmplen > l)