diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | xfile.h | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,7 @@ Version 4.8 - 21 Jan 2011, by Per Øyvind Karlsen + +- fix a bug causing segfault when trying open a non-existing segfault which + for some reaallly odd reason didn't get triggered before now - remove a last couple of remaining leftovers after db conversion - really include the workaround for removal issue that was accidentally omitted in the previous release @@ -93,7 +93,9 @@ static xFile xOpen(const char *path) { cookie = magic_open(MAGIC_NONE); if(!magic_load(cookie, NULL)) { message = magic_file(cookie, path); - if(strstr(message, "gzip compressed")) + if(message == NULL) + xF.type = XF_FAIL; + else if(strstr(message, "gzip compressed")) xF.type = XF_GZIP; else if(strstr(message, "xz compressed")) xF.type = XF_XZ; |