Branch: Tag:

2018-06-29

2018-06-29 09:33:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem.Monitor: Fix NULL-dereference in bump().

Survive st being zero in bump().

Fixes PIKE-116 (#8116).

1:   //   // Basic filesystem monitor.   // - // $Id: basic.pike,v 1.38 2010/04/27 15:00:54 grubba Exp $ + // $Id$   //   // 2009-07-09 Henrik Grubbström   //
310:    next_poll -= seconds || 30;    monitor_queue->adjust(this);    -  if ((flags & MF_RECURSE) && st->isdir && files) { +  if ((flags & MF_RECURSE) && st && st->isdir && files) {    // Bump the files in the directory as well.    foreach(files, string file) {    file = canonic_path(Stdio.append_path(path, file));