Really check for fd
authorJulien Danjou <julien@danjou.info>
Thu, 14 Dec 2006 10:46:47 +0000 (11:46 +0100)
committerPierre Habouzit <madcoder@debian.org>
Thu, 14 Dec 2006 13:49:23 +0000 (14:49 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
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 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);
       return -1;
   }
   close(tmpfd);