commit b5917e6: [Minor] Archives: More fixes to 7zip parsing
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Jan 11 15:35:08 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-01-11 15:06:52 +0000
URL: https://github.com/rspamd/rspamd/commit/b5917e6cb15b22342db93593611e61b2e667d699
[Minor] Archives: More fixes to 7zip parsing
---
src/libmime/archives.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index 110ce9417..34c529a64 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -995,7 +995,7 @@ end:
static const guchar *
rspamd_7zip_read_folder (struct rspamd_task *task,
const guchar *p, const guchar *end,
- struct rspamd_archive *arch, guint *pnstreams)
+ struct rspamd_archive *arch, guint *pnstreams, guint *ndigests)
{
guint64 ncoders = 0, i, j, noutstreams = 0, ninstreams = 0;
@@ -1086,6 +1086,7 @@ rspamd_7zip_read_folder (struct rspamd_task *task,
}
*pnstreams = noutstreams;
+ (*ndigests) += npacked;
return p;
}
@@ -1149,9 +1150,7 @@ rspamd_7zip_read_coders_info (struct rspamd_task *task,
for (i = 0; i < num_folders && p != NULL && p < end; i++) {
p = rspamd_7zip_read_folder (task, p, end, arch,
- &folder_nstreams[i]);
-
- num_digests += folder_nstreams[i];
+ &folder_nstreams[i], &num_digests);
}
}
break;
More information about the Commits
mailing list