mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-27 08:58:31 +00:00
Check fopen() return in logfile_append()
This commit is contained in:
parent
30652f58b4
commit
2a188df857
@ -51,6 +51,13 @@ void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
|
|||||||
|
|
||||||
FILE *fp = fopen (logfile_ctx->logfile, "ab");
|
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);
|
lock_file (fp);
|
||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
Loading…
Reference in New Issue
Block a user