... | ... |
@@ -2369,7 +2369,19 @@ static int magic_scandesc(int desc, cli_ctx *ctx, cli_file_t type) |
2369 | 2369 |
ctx->fmap--; |
2370 | 2370 |
cli_bitset_free(ctx->hook_lsig_matches); |
2371 | 2371 |
ctx->hook_lsig_matches = old_hook_lsig_matches; |
2372 |
- ret_from_magicscan(ret); |
|
2372 |
+ /* Same switch as end of magic_scandesc function */ |
|
2373 |
+ switch(ret) { |
|
2374 |
+ case CL_EFORMAT: |
|
2375 |
+ case CL_EMAXREC: |
|
2376 |
+ case CL_EMAXSIZE: |
|
2377 |
+ case CL_EMAXFILES: |
|
2378 |
+ cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(ret)); |
|
2379 |
+ case CL_CLEAN: /* here, only from cli_checkfp() */ |
|
2380 |
+ cache_add(hash, hashed_size, ctx); |
|
2381 |
+ ret_from_magicscan(CL_CLEAN); |
|
2382 |
+ default: |
|
2383 |
+ ret_from_magicscan(ret); |
|
2384 |
+ } |
|
2373 | 2385 |
} |
2374 | 2386 |
} |
2375 | 2387 |
|