summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-07-14 16:33:39 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-07-14 16:33:39 +0200
commit3b482239db60d25ecdf72ba33aff70ba8cac4da1 (patch)
tree4368db885d7e511baed848bafac1d9da9c37f873 /src
parent0f97d72be8db4447e4c99e851cce491d9cfa1227 (diff)
PhotoRec: fix file_rsearch() function to avoid a false positive.
Thanks to Adel KHALDI from Blue Frost Security GmbH for asking how this function was working.
Diffstat (limited to 'src')
-rw-r--r--src/filegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filegen.c b/src/filegen.c
index 814d1c7..919b918 100644
--- a/src/filegen.c
+++ b/src/filegen.c
@@ -220,7 +220,7 @@ uint64_t file_rsearch(FILE *handle, uint64_t offset, const void*footer, const un
return offset + i;
}
}
- memcpy(buffer+read_size,buffer,footer_length-1);
+ memcpy(buffer+4096,buffer,footer_length-1);
} while(offset>0);
free(buffer);
return 0;