handle null ctx, required for sigtool (bb#846)

git-svn: trunk@3647
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent aeebf2ea28
commit fa97314dd7
  1. 4
      ChangeLog
  2. 4
      libclamav/ole2_extract.c

@ -1,3 +1,7 @@
Sun Feb 17 10:53:57 CET 2008 (tk)
---------------------------------
* libclamav/ole2_extract.c: handle null ctx, required for sigtool (bb#846)
Sat Feb 16 16:52:00 EET 2008 (edwin)
------------------------------------
* libclamav/others.h: cannot use if in cli_dbgmsg() macro

@ -469,7 +469,7 @@ static void ole2_walk_property_tree(int fd, ole2_header_t *hdr, const char *dir,
property_t prop_block[4];
int32_t idx, current_block, i;
char *dirname;
const struct cl_limits *limits = ctx->limits;
const struct cl_limits *limits = ctx ? ctx->limits : NULL;
current_block = hdr->prop_start;
@ -797,7 +797,7 @@ int cli_ole2_extract(int fd, const char *dirname, cli_ctx *ctx)
cli_dbgmsg("in cli_ole2_extract()\n");
if (ctx->limits && ctx->limits->maxscansize) {
if (ctx && ctx->limits && ctx->limits->maxscansize) {
if (ctx->limits->maxscansize > ctx->scansize)
scansize = ctx->limits->maxscansize - ctx->scansize;
else

Loading…
Cancel
Save