Fix possible crashers in filetypes_detect_from_file_internal()
commitcb72e1d85fa687d88a47eba43c47b1ee4dddea80
authorColomban Wendling <ban@herbesfolles.org>
Sun, 13 Nov 2011 19:39:39 +0000 (13 20:39 +0100)
committerColomban Wendling <ban@herbesfolles.org>
Sun, 13 Nov 2011 19:39:39 +0000 (13 20:39 +0100)
treec7fbc7bfd3e7c3f46a05557f755932f1c721d531
parent70f41f6485c717a6c5e988062f823628c559740f
Fix possible crashers in filetypes_detect_from_file_internal()

* Never try to do a regex match on a NULL string;
* Don't try to unref a possibly NULL regex.
src/filetypes.c