summaryrefslogtreecommitdiffstats
path: root/src/file_zip.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-08-22 19:38:47 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-08-22 19:38:47 +0200
commit037787b0b2fa0e1e2f5311d2304fda942d24b0a7 (patch)
tree58d1a2d54dd6641d1b840f8e3304665c240daa9a /src/file_zip.c
parent4ad1703dd33ba37e94086abd8cf3725d29038d02 (diff)
PhotoRec: little optimisation when searching a pattern in zip file
Diffstat (limited to 'src/file_zip.c')
-rw-r--r--src/file_zip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_zip.c b/src/file_zip.c
index a6e4690..4bda072 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -110,7 +110,7 @@ static int64_t file_get_pos(FILE *f, const void* needle, const unsigned int size
while (left>=size)
{
- if (memcmp(buffer+count, needle, size)==0)
+ if (buffer[count]==*(const char *)needle && memcmp(buffer+count, needle, size)==0)
{
free(buffer);
if(fseek(f, (long)count-read_size, SEEK_CUR)<0)