Fix out-of-bounds write when reading inotify events, reported by Timo Teräs