]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Additional sanity check
authorFlole998 <Flole998@users.noreply.github.com>
Mon, 6 Jul 2020 15:13:37 +0000 (17:13 +0200)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2020 15:13:37 +0000 (17:13 +0200)
src/dvr/dvr_inotify.c

index 6311b3b0a7532c7d091f7df83bda95a33a447756..10f34a08f3ecfde124e2b2d5285b31c3dbd09b03 100644 (file)
@@ -398,7 +398,7 @@ void* _dvr_inotify_thread ( void *p )
       ev = (struct inotify_event *)&buf[i];
       tvhtrace(LS_DVR_INOTIFY, "i=%d len=%d name=%s", i, len, ev->name);
       i += EVENT_SIZE + ev->len;
-      if (i > len)
+      if (i > len || i < 0)
         break;
 
       /* Moved */