xls: added OTF SummaryInfo and DocumentSummary streams parsing support

pull/6/head
Kevin Lin 11 years ago
parent 4c37996842
commit a2a9993cd7
  1. 15
      libclamav/ole2_extract.c

@ -890,7 +890,7 @@ handler_enum(ole2_header_t * hdr, property_t * prop, const char *dir, cli_ctx *
static int
handler_otf(ole2_header_t * hdr, property_t * prop, const char *dir, cli_ctx * ctx)
{
char *tempfile;
char *tempfile, *name;
unsigned char *buff;
int32_t current_block, len, offset;
int ofd, ret;
@ -1000,6 +1000,19 @@ handler_otf(ole2_header_t * hdr, property_t * prop, const char *dir, cli_ctx * c
cli_bitset_free(blk_bitset);
return CL_ESEEK;
}
/* JSON Parsing */
name = get_property_name2(prop->name, prop->name_size);
if (!strncmp(name, "_5_summaryinformation", 21)) {
cli_dbgmsg("OLE2: detected a '_5_summaryinformation' stream\n");
cli_ole2_summary_json(ctx, ofd, 0);
}
if (!strncmp(name, "_5_documentsummaryinformation", 29)) {
cli_dbgmsg("OLE2: detected a '_5_documentsummaryinformation' stream\n");
cli_ole2_summary_json(ctx, ofd, 1);
}
/* Normal File Scan */
ret = cli_magic_scandesc(ofd, ctx);
close(ofd);
free(buff);

Loading…
Cancel
Save