bb11896 -- increasing size of max filter for pdf filter heuristic. Still have work to be done to investigate whitelisting issue. This commit additionally fixes a compile error when building with json-c and fixes a couple of minor warnings.

remotes/push_mirror/bug11858-pull-requests
Micah Snyder 8 years ago
parent ede14b0281
commit 726918859a
  1. 2
      libclamav/pdf.h
  2. 7
      libclamav/scanners.c
  3. 3
      shared/queue.h

@ -23,7 +23,7 @@
#include "others.h"
#define PDF_FILTERLIST_MAX 64
#define PDF_FILTER_DTRIGGER 8
#define PDF_FILTER_DTRIGGER 16
struct pdf_obj {
uint32_t start;
uint32_t id;

@ -3959,7 +3959,12 @@ static int scan_common(int desc, cl_fmap_t *map, const char **virname, unsigned
}
/* backwards compatibility: scan the json string unless a virus was detected */
if (rc != CL_VIRUS && (iroot->ac_lsigs || iroot->ac_patterns || iroot->pcre_metas))
if (rc != CL_VIRUS && (iroot->ac_lsigs
|| iroot->ac_patterns
#ifdef HAVE_PCRE
|| iroot->pcre_metas
#endif
))
{
cli_dbgmsg("scan_common: running deprecated preclass bytecodes for target type 13\n");
ctx.options &= ~CL_SCAN_FILE_PROPERTIES;

@ -238,6 +238,7 @@ struct { \
SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
} while (0)
#undef SLIST_SWAP
#define SLIST_SWAP(head1, head2, type) do { \
struct type *swap_first = SLIST_FIRST(head1); \
SLIST_FIRST(head1) = SLIST_FIRST(head2); \
@ -473,8 +474,10 @@ struct { \
(elm)->field.le_prev = &LIST_FIRST((head)); \
} while (0)
#undef LIST_NEXT
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
#undef LIST_PREV
#define LIST_PREV(elm, head, type, field) \
((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \
__containerof((elm)->field.le_prev, struct type, field.le_next))

Loading…
Cancel
Save