git-svn: trunk@3647
Tomasz Kojm authored on 2008/02/17 19:06:14... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Sun Feb 17 10:53:57 CET 2008 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav/ole2_extract.c: handle null ctx, required for sigtool (bb#846) |
|
4 |
+ |
|
1 | 5 |
Sat Feb 16 16:52:00 EET 2008 (edwin) |
2 | 6 |
------------------------------------ |
3 | 7 |
* 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, |
469 | 469 |
property_t prop_block[4]; |
470 | 470 |
int32_t idx, current_block, i; |
471 | 471 |
char *dirname; |
472 |
- const struct cl_limits *limits = ctx->limits; |
|
472 |
+ const struct cl_limits *limits = ctx ? ctx->limits : NULL; |
|
473 | 473 |
|
474 | 474 |
current_block = hdr->prop_start; |
475 | 475 |
|
... | ... |
@@ -797,7 +797,7 @@ int cli_ole2_extract(int fd, const char *dirname, cli_ctx *ctx) |
797 | 797 |
|
798 | 798 |
cli_dbgmsg("in cli_ole2_extract()\n"); |
799 | 799 |
|
800 |
- if (ctx->limits && ctx->limits->maxscansize) { |
|
800 |
+ if (ctx && ctx->limits && ctx->limits->maxscansize) { |
|
801 | 801 |
if (ctx->limits->maxscansize > ctx->scansize) |
802 | 802 |
scansize = ctx->limits->maxscansize - ctx->scansize; |
803 | 803 |
else |