mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
FileAnalysis: load custom mime magic database just once.
This works around a bug in libmagic since version 5.12 (current at time of writing is 5.14) -- second call to magic_load() w/ non-default database segfaults.
This commit is contained in:
parent
d22f30e9a1
commit
0141f51801
7 changed files with 15 additions and 32 deletions
|
@ -370,6 +370,9 @@ struct CompareString
|
|||
}
|
||||
};
|
||||
|
||||
extern magic_t magic_desc_cookie;
|
||||
extern magic_t magic_mime_cookie;
|
||||
|
||||
void bro_init_magic(magic_t* cookie_ptr, int flags);
|
||||
const char* bro_magic_buffer(magic_t cookie, const void* buffer, size_t length);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue