diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-11-23 20:33:54 +0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2012-11-24 17:01:08 -0800 |
commit | 252fd599729d977025b8a65191805ac0971114b3 (patch) | |
tree | f13d7fdf0c55bbfe35db734fb0a6046388b552f6 /dedupe | |
parent | d21a4681058749020f77d7cc7f93cd99d0e0a69a (diff) | |
download | bootable_recovery-252fd599729d977025b8a65191805ac0971114b3.zip bootable_recovery-252fd599729d977025b8a65191805ac0971114b3.tar.gz bootable_recovery-252fd599729d977025b8a65191805ac0971114b3.tar.bz2 |
dedupe: fix buffer overflow
the length of key was incorrect, 4.2's libc detects the overflow
and crashes
Change-Id: I0970848c6c089b86907827ce8242ef7499b12d63
Diffstat (limited to 'dedupe')
-rw-r--r-- | dedupe/dedupe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dedupe/dedupe.c b/dedupe/dedupe.c index dea544c..9291ecb 100644 --- a/dedupe/dedupe.c +++ b/dedupe/dedupe.c @@ -119,7 +119,7 @@ static int store_file(struct DEDUPE_STORE_CONTEXT *context, struct stat st, cons // this is to get around vfat having a 64k directory size limit (usually around 20k files) char out_blob[PATH_MAX]; char tmp_out_blob[PATH_MAX]; - char key[SHA256_DIGEST_LENGTH + SHA256_DIGEST_LENGTH / 3 + 3]; + char key[SHA256_DIGEST_LENGTH * 2 + 2]; // int i = 0; // int keyIndex = 0; // while (psum[i]) { |