[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 01:00:56 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 567f60a378848a936d8d46dfd328713c39d95c8e
Author: aCaB <acab at clamav.net>
Date: Sat Aug 22 17:51:02 2009 +0200
proper fix for readchunk
diff --git a/libclamav/htmlnorm.c b/libclamav/htmlnorm.c
index 7ba6847..66038f4 100644
--- a/libclamav/htmlnorm.c
+++ b/libclamav/htmlnorm.c
@@ -215,17 +215,19 @@ static unsigned char *cli_readchunk(FILE *stream, m_area_t *m_area, unsigned int
chunk_len = 0;
ptr = start;
}
+ if(m_area->map)
+ ptr = (unsigned char *)fmap_need_ptr(m_area->map, ptr, end - ptr); /* FIXME: make this need_once */
/* we have unknown number of NULL chars,
* copy char-by-char and skip them */
while((ptr < end) && (chunk_len < max_len-1)) {
const unsigned char c = *ptr++;
/* we can't use chunk_len to determine how many bytes we read, since
* we skipped chars */
- m_area->offset++;
if(c) {
chunk[chunk_len++] = c;
}
}
+ m_area->offset += ptr - start;
chunk[chunk_len] = '\0';
}
if(ptr && ptr < end && !isspace(*ptr)) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list