Check for unset MSGLOG_FILE or CTOOLZ_DIR, or failed stat(), in readlog()
Unset MSGLOG_FILE or CTOOLZ_DIR could cause a null pointer dereference. If stat() failed it dereferenced the bogus 'struct stat', and in the directory case just silently failed. Now it falls through to the "error opening" path.
This commit is contained in:
Reference in New Issue
Block a user