Browse code

fix fd check

git-svn: trunk@3681

Tomasz Kojm authored on 2008/02/27 21:16:10
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Feb 27 12:17:19 CET 2008 (tk)
2
+---------------------------------
3
+  * libclamav/untar.c: fix fd check
4
+
1 5
 Wed Feb 27 09:29:23 GMT 2008 (njh)
2 6
 ---------------------------------
3 7
   * libclamav/vba_extract.c:	Minor code tidy
... ...
@@ -169,7 +169,7 @@ cli_untar(const char *dir, int desc, unsigned int posix, cli_ctx *ctx)
169 169
 			size = octal(osize);
170 170
 			if(size < 0) {
171 171
 				cli_errmsg("Invalid size in tar header\n");
172
-				if(fout)
172
+				if(fout>=0)
173 173
 					close(fout);
174 174
 				return CL_CLEAN;
175 175
 			}