From e3ad2f9b7d76b6706482818ca0ef921ba2e40d37 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 5 Jan 2017 17:39:14 +0100 Subject: [PATCH] Fixed buffer overflow in plaintext parsing code: Leading to segfault --- docs/changes.txt | 1 + src/interface.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 1f42f1078..859d2e295 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -23,6 +23,7 @@ ## - Fixed buffer overflow in status screen display in case of long non-utf8 string +- Fixed buffer overflow in plaintext parsing code: Leading to segfault - Fixed custom char parsing code in maskfiles in --increment mode: Custom charset wasn't used - Fixed display screen to show input queue when using custom charset or rules - Fixed double fclose() using AMDGPU-Pro on sysfs compatible platform: Leading to segfault diff --git a/src/interface.c b/src/interface.c index 3e5965f40..a665b44b8 100644 --- a/src/interface.c +++ b/src/interface.c @@ -13045,7 +13045,7 @@ int plaintext_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_ memset (digest, 0, hashconfig->dgst_size); - memcpy (digest + 64, input_buf, input_len); + memcpy (digest + 16, input_buf, input_len); //strncpy ((char *) digest + 64, (char *) input_buf, 64);