Browse code

mark top of the fmap stack

aCaB authored on 2010/03/06 01:41:55
Showing 1 changed files
... ...
@@ -2306,15 +2306,13 @@ int cl_scandesc(int desc, const char **virname, unsigned long int *scanned, cons
2306 2306
     ctx.container_type = CL_TYPE_ANY;
2307 2307
     ctx.container_size = 0;
2308 2308
     ctx.dconf = (struct cli_dconf *) engine->dconf;
2309
-    ctx.fmap = cli_calloc(sizeof(fmap_t *), ctx.engine->maxreclevel + 1);
2309
+    ctx.fmap = cli_calloc(sizeof(fmap_t *), ctx.engine->maxreclevel + 2);
2310 2310
     if(!ctx.fmap)
2311 2311
 	return CL_EMEM;
2312
-    ctx.fmap--;
2313 2312
     ctx.hook_lsig_matches = cli_bitset_init();
2314 2313
 
2315 2314
     rc = cli_magic_scandesc(desc, &ctx);
2316 2315
 
2317
-    ctx.fmap++;
2318 2316
     cli_bitset_free(ctx.hook_lsig_matches);
2319 2317
     free(ctx.fmap);
2320 2318
     if(rc == CL_CLEAN && ctx.found_possibly_unwanted)