Fix possible null pointer dereference in identify_data BIF.

There was no check/handling for if magic_buffer() returns null.
Also centralized libmagic calls for consistent error handling/output.
This commit is contained in:
Jon Siwek 2013-02-27 16:04:36 -06:00
parent dd9f361bc7
commit 2481f9f837
5 changed files with 47 additions and 46 deletions

View file

@ -29,8 +29,6 @@ protected:
char buffer[BUFFER_SIZE];
int buffer_len;
static void InitMagic(magic_t* magic, int flags);
static magic_t magic;
static magic_t magic_mime;
};