From 6582a8ae21234a443cbb7f9ef0ae9ba26e35c729 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 26 Oct 2016 13:21:10 +0200 Subject: [PATCH] Fix https://github.com/hashcat/hashcat/issues/549 --- src/outfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/outfile.c b/src/outfile.c index 9b036cdd7..2527e12c8 100644 --- a/src/outfile.c +++ b/src/outfile.c @@ -419,9 +419,10 @@ int outfile_write (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const unsign tmp_buf[tmp_len] = 0; - if (outfile_ctx->fp) + if (outfile_ctx->fp != NULL) { - fwrite (EOL, strlen (EOL), 1, outfile_ctx->fp); + fwrite (tmp_buf, tmp_len, 1, outfile_ctx->fp); + fwrite (EOL, strlen (EOL), 1, outfile_ctx->fp); } return tmp_len;