Merge branch 'master' of ssh://git.clam.sourcefire.com/var/lib/git/clamav-devel

This commit is contained in:
Tomasz Kojm
2011-06-07 11:01:58 +02:00
3 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
Thu May 26 14:17:52 CEST 2011 (acab)
------------------------------------
* libclamav/matcher-hash.c: in hm_sort don't swap an item with itself (bb#2818)
Thu May 12 13:01:56 CEST 2011 (tk)
----------------------------------
* freshclam/manager.c: fix return code of Rfc2822DateTime() (bb#2809)

View File

@@ -148,6 +148,7 @@ static void hm_sort(struct cli_sz_hash *szh, size_t l, size_t r, unsigned int ke
while(l1 < r1) {
if(hm_cmp(&szh->hash_array[keylen * l1], piv, keylen) > 0) {
r1--;
if(l1 == r1) break;
memcpy(tmph, &szh->hash_array[keylen * l1], keylen);
tmpv = szh->virusnames[l1];
memcpy(&szh->hash_array[keylen * l1], &szh->hash_array[keylen * r1], keylen);

View File

@@ -1314,6 +1314,8 @@ static void pdf_handle_enc(struct pdf_struct *pdf)
if (pdf->enc_objid == ~0u || !pdf->fileID)
return;
obj = find_obj(pdf, pdf->objs, pdf->enc_objid);
if (!obj)
return;
required_flags = (1 << OBJ_HASFILTERS) | (1 << OBJ_FILTER_STANDARD);
if (!(obj->flags & required_flags))
return;
@@ -1539,7 +1541,7 @@ int cli_pdf(const char *dir, cli_ctx *ctx, off_t offset)
/* It is encrypted, and a password/key needs to be supplied to decrypt.
* This doesn't trigger for PDFs that are encrypted but don't need
* a password to decrypt */
*ctx->virname = "Encrypted.PDF";
*ctx->virname = "Heuristics.Encrypted.PDF";
rc = CL_VIRUS;
}