Browse code

fix logic error in cli_filetype()

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@789 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/08/24 20:49:27
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Aug 24 13:47:07 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav: fix logic error in cli_filetype() (thanks to Tomasz Papszun)
4
+
1 5
 Tue Aug 24 02:30:28 CEST 2004 (tk)
2 6
 ----------------------------------
3 7
   * libclamav: only enable signature file type recognition for text files
... ...
@@ -155,7 +155,7 @@ cli_file_t cli_filetype(const char *buf, size_t buflen)
155 155
     }
156 156
 
157 157
     for(i = 0; i < buflen; i++)
158
-	if(isprint(buf[i])) { /* FIXME: do we need to handle intern. chars? */
158
+	if(!isprint(buf[i])) { /* FIXME: do we need to handle intern. chars? */
159 159
 	    ascii = 0;
160 160
 	    break;
161 161
 	}