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:
Jon Siwek 2013-04-29 11:34:27 -05:00
parent d22f30e9a1
commit 0141f51801
7 changed files with 15 additions and 32 deletions

View file

@ -3,7 +3,6 @@
#include <string>
#include <vector>
#include <magic.h>
#include "AnalyzerTags.h"
#include "Conn.h"
@ -207,8 +206,6 @@ protected:
*/
static void StaticInit();
static magic_t magic_mime;
static string salt;
static int id_idx;