1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-18 12:48:18 +00:00

Fix eventual null-pointer dereference

This commit is contained in:
Jens Steube 2016-11-11 15:30:31 +01:00
parent 15100059fa
commit 3391dc49cd

View File

@ -44,7 +44,10 @@ void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, cons
event_ctx->old_len[i] = event_ctx->old_len[i - 1]; event_ctx->old_len[i] = event_ctx->old_len[i - 1];
} }
if (buf)
{
memcpy (event_ctx->old_buf[0], buf, len); memcpy (event_ctx->old_buf[0], buf, len);
}
event_ctx->old_len[0] = len; event_ctx->old_len[0] = len;
} }