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

pull/69/head
Kevin Lin 11 years ago
commit 65724ccf2a
  1. 2
      libclamav/dmg.c
  2. 4
      libclamav/ooxml.c
  3. 2
      libclamav/openioc.c
  4. 4
      libclamav/others.h
  5. 2
      libclamav/xar.c
  6. 2
      libclamav/xdp.c

@ -209,7 +209,7 @@ int cli_scandmg(cli_ctx *ctx)
#if HAVE_LIBXML2
/* XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_COMPACT */
#define DMG_XML_PARSE_OPTS (1 << 1 | 1 << 11 | 1 << 16)
#define DMG_XML_PARSE_OPTS ((1 << 1 | 1 << 11 | 1 << 16) | CLAMAV_MIN_XMLREADER_FLAGS)
reader = xmlReaderForMemory(outdata, (int)hdr.xmlLength, "toc.xml", NULL, DMG_XML_PARSE_OPTS);
if (!reader) {

@ -368,7 +368,7 @@ static int ooxml_parse_document(int fd, cli_ctx *ctx)
cli_dbgmsg("in ooxml_parse_document\n");
reader = xmlReaderForFd(fd, "properties.xml", NULL, 0);
reader = xmlReaderForFd(fd, "properties.xml", NULL, CLAMAV_MIN_XMLREADER_FLAGS);
if (reader == NULL) {
cli_dbgmsg("ooxml_parse_document: xmlReaderForFd error\n");
return CL_SUCCESS; // internal error from libxml2
@ -416,7 +416,7 @@ static int ooxml_content_cb(int fd, cli_ctx *ctx)
cli_dbgmsg("in ooxml_content_cb\n");
reader = xmlReaderForFd(fd, "[Content_Types].xml", NULL, 0);
reader = xmlReaderForFd(fd, "[Content_Types].xml", NULL, CLAMAV_MIN_XMLREADER_FLAGS);
if (reader == NULL) {
cli_dbgmsg("ooxml_content_cb: xmlReaderForFd error for ""[Content_Types].xml""\n");
return CL_SUCCESS; // libxml2 failed!

@ -197,7 +197,7 @@ int openioc_parse(const char * fname, int fd, struct cl_engine *engine, unsigned
cli_dbgmsg("openioc_parse: XML parsing file %s\n", fname);
reader = xmlReaderForFd(fd, NULL, NULL, 0);
reader = xmlReaderForFd(fd, NULL, NULL, CLAMAV_MIN_XMLREADER_FLAGS);
if (reader == NULL) {
cli_dbgmsg("openioc_parse: xmlReaderForFd error\n");
return CL_EOPEN;

@ -54,6 +54,10 @@
#include "json.h"
#endif
#if HAVE_LIBXML2
#define CLAMAV_MIN_XMLREADER_FLAGS (XML_PARSE_NOERROR | XML_PARSE_NONET)
#endif
/*
* CL_FLEVEL is the signature f-level specific to the current code and
* should never be modified

@ -516,7 +516,7 @@ int cli_scanxar(cli_ctx *ctx)
goto exit_toc;
}
reader = xmlReaderForMemory(toc, hdr.toc_length_decompressed, "noname.xml", NULL, 0);
reader = xmlReaderForMemory(toc, hdr.toc_length_decompressed, "noname.xml", NULL, CLAMAV_MIN_XMLREADER_FLAGS);
if (reader == NULL) {
cli_dbgmsg("cli_scanxar: xmlReaderForMemory error for TOC\n");
goto exit_toc;

@ -122,7 +122,7 @@ int cli_scanxdp(cli_ctx *ctx)
* silently ignore the error and return CL_SUCCESS so the filetyping code can
* continue on.
*/
reader = xmlReaderForMemory(buf, (int)(map->len), "noname.xml", NULL, XML_PARSE_NOERROR);
reader = xmlReaderForMemory(buf, (int)(map->len), "noname.xml", NULL, CLAMAV_MIN_XMLREADER_FLAGS);
if (!(reader))
return CL_SUCCESS;

Loading…
Cancel
Save