Skip to content

Commit

Permalink
Detect invalid inotify watch IDs. Fixes #1364.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Jan 6, 2016
1 parent a16c54e commit 90ed699
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/vibe/core/drivers/libevent2.d
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,10 @@ final class InotifyDirectoryWatcher : DirectoryWatcher {
for (auto p = buf.ptr; p < buf.ptr + nread; )
{
auto ev = cast(inotify_event*)p;
if (ev.wd !in m_watches) {
logDebug("Got unknown inotify watch ID %s. Ignoring.", ev.wd);
continue;
}

DirectoryChangeType type;
if (ev.mask & (IN_CREATE|IN_MOVED_TO))
Expand Down

0 comments on commit 90ed699

Please sign in to comment.