Really check for fd
[apps/madmutt.git] / lib-mx / compress.c
index 1684dd3..df6c761 100644 (file)
@@ -200,7 +200,7 @@ int mutt_open_read_compressed(CONTEXT * ctx)
   /* If we cannot open tempfile, that means the file already exists (!?)
    * or we are following a symlink, which is bad and insecure.
    */
-  if(!tmpfd) {
+  if(tmpfd < 0) {
       return -1;
   }
   close(tmpfd);