[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
aCaB
acab at clamav.net
Sun Apr 4 00:59:58 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 58a839319a2b4e277d11f4c608146b330742eb28
Author: aCaB <acab at clamav.net>
Date: Thu Aug 20 12:41:00 2009 +0200
fixes
diff --git a/libclamav/fmap.c b/libclamav/fmap.c
index 6d0b65d..6b05fc6 100644
--- a/libclamav/fmap.c
+++ b/libclamav/fmap.c
@@ -113,7 +113,7 @@ struct F_MAP *fmap(int fd, off_t offset, size_t len) {
return NULL;
}
pages = fmap_align_items(len, pgsz);
- hdrsz = fmap_align_to(sizeof(struct F_MAP) + pages * sizeof(uint16_t), 16);
+ hdrsz = fmap_align_to(sizeof(struct F_MAP) + pages * sizeof(uint16_t), pgsz);
mapsz = pages * pgsz + hdrsz;
if ((m = (struct F_MAP *)mmap(NULL, mapsz, PROT_READ | PROT_WRITE, MAP_PRIVATE|ANONYMOUS_MAP, -1, 0)) == MAP_FAILED) {
cli_warnmsg("fmap: mmap() failed\n");
diff --git a/libclamav/ishield.c b/libclamav/ishield.c
index e65c319..25cc8b0 100644
--- a/libclamav/ishield.c
+++ b/libclamav/ishield.c
@@ -505,10 +505,10 @@ static int is_parse_hdr(int desc, cli_ctx *ctx, struct IS_CABSTUFF *c) {
cli_errmsg("is_parse_hdr: mmap failed\n");
return CL_EMEM;
}
- hdr = map + c->hdr - mp_hdr;
+ h1 = (struct IS_HDR *)fmap_need_off(map, c->hdr - mp_hdr, sizeof(*h1));
+ hdr = (char *)h1;
}
- h1 = (struct IS_HDR *)fmap_need_ptr(map, hdr, sizeof(*h1));
if(!h1) {
cli_dbgmsg("is_parse_hdr: not enough room for H1\n");
fmunmap(map);
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list