diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | xfile.h | 6 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Version 4.14 - Jan 2011, by Per Øyvind Karlsen + +- fix segfault when trying to open non-existing synthesis + Version 4.13 - 24 Jan 2011, by Per Øyvind Karlsen - move disttag/distepoch pattern matching breakage hack into rpm @@ -117,12 +117,16 @@ static xFile xOpen(const char *path) { switch(xF.type) { case XF_GZIP: xF.f.gz = gzopen(path, "rb"); + if(xF.f.gz == NULL) + xF.type = XF_FAIL; break; case XF_ASCII: case XF_LZMA: case XF_XZ: xF.fp = fopen(path, "rb"); - if(xF.type == XF_ASCII) break; + if(xF.fp == NULL) + xF.type = XF_FAIL; + if(xF.type == XF_ASCII || xF.type == XF_FAIL) break; xF.f.xz = lzma_open(&ret, xF.fp, -1); if(ret != LZMA_OK) xF.type = XF_FAIL; |