1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-22 21:51:07 +00:00

Check fopen() return in logfile_append()

This commit is contained in:
jsteube 2016-11-20 20:58:56 +01:00
parent 30652f58b4
commit 2a188df857

View File

@ -51,6 +51,13 @@ void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
FILE *fp = fopen (logfile_ctx->logfile, "ab");
if (fp == NULL)
{
event_log_error (hashcat_ctx, "%s: %s", logfile_ctx->logfile, strerror (errno));
return;
}
lock_file (fp);
va_list ap;