« Previous | Next » 

Revision c951d9a6

IDc951d9a6751576a076ac80a5e5145ceb8d794d38

Added by Markus Armbruster over 12 years ago

monitor: Fix file_completion() to check for stat() failure

stat() can fail for a file name just read with readdir(). Easiest way
to trigger is a dangling symbolic link --- look ma, no race! When it
fails, file_completion() uses sb.st_mode uninitialized. If the
directory bit happens to be set, it appends a "/" to the completed
name.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences