mirror of https://github.com/google/oss-fuzz.git
Process compressed files and analyse as much as possible (#8535)
- MAGIC_COMPRESS: If the file is compressed, unpack it and look at the contents. - MAGIC_CONTINUE: Return all matches, not just the first. Co-authored-by: Julien Voisin <jvoisin@google.com>
This commit is contained in:
parent
5678b99ef5
commit
44d55a37f3
|
@ -23,7 +23,7 @@
|
|||
|
||||
struct Environment {
|
||||
Environment(std::string data_dir) {
|
||||
magic = magic_open(MAGIC_NONE);
|
||||
magic = magic_open(MAGIC_COMPRESS|MAGIC_CONTINUE);
|
||||
std::string magic_path = data_dir + "/magic";
|
||||
if (magic_load(magic, magic_path.c_str())) {
|
||||
fprintf(stderr, "error loading magic file: %s\n", magic_error(magic));
|
||||
|
|
Loading…
Reference in New Issue