...
|
...
|
@@ -1961,6 +1961,7 @@ int cli_magic_scandesc(int desc, cli_ctx *ctx)
|
1961
|
1961
|
emax_reached(ctx);
|
1962
|
1962
|
}
|
1963
|
1963
|
|
|
1964
|
+ ctx->hook_lsig_matches = old_hook_lsig_matches;
|
1964
|
1965
|
funmap(*ctx->fmap);
|
1965
|
1966
|
ctx->fmap--;
|
1966
|
1967
|
ret_from_magicscan(ret);
|
...
|
...
|
@@ -1970,14 +1971,17 @@ int cli_magic_scandesc(int desc, cli_ctx *ctx)
|
1970
|
1970
|
if(type == CL_TYPE_ERROR) {
|
1971
|
1971
|
cli_dbgmsg("cli_magic_scandesc: cli_filetype2 returned CL_TYPE_ERROR\n");
|
1972
|
1972
|
funmap(*ctx->fmap);
|
1973
|
|
- ctx->fmap--;
|
|
1973
|
+ ctx->fmap--;
|
|
1974
|
+ ctx->hook_lsig_matches = old_hook_lsig_matches;
|
1974
|
1975
|
ret_from_magicscan(CL_EREAD);
|
1975
|
1976
|
}
|
1976
|
1977
|
lseek(desc, 0, SEEK_SET); /* FIXMEFMAP: remove ? */
|
1977
|
1978
|
|
1978
|
1979
|
ctx->hook_lsig_matches = cli_bitset_init();
|
1979
|
|
- if (!ctx->hook_lsig_matches)
|
|
1980
|
+ if (!ctx->hook_lsig_matches) {
|
|
1981
|
+ ctx->hook_lsig_matches = old_hook_lsig_matches;
|
1980
|
1982
|
ret_from_magicscan(CL_EMEM);
|
|
1983
|
+ }
|
1981
|
1984
|
|
1982
|
1985
|
if(type != CL_TYPE_IGNORED && ctx->engine->sdb) {
|
1983
|
1986
|
if((ret = cli_scanraw(ctx, type, 0, &dettype, hash)) == CL_VIRUS) {
|