Browse code

fix signature target type validation for data files of unknown type

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

Tomasz Kojm authored on 2004/10/19 09:55:47
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Tue Oct 19 02:53:46 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav/matcher.c: fix signature target type validation for data files
4
+			 of unknown type
5
+
1 6
 Sun Oct 17 18:33:10 CEST 2004 (tk)
2 7
 ----------------------------------
3 8
   V 0.80
... ...
@@ -150,11 +150,12 @@ static long int cli_caloff(const char *offstr, int fd)
150 150
 int cli_validatesig(unsigned short target, unsigned short ftype, const char *offstr, unsigned long int fileoff, int desc, const char *virname)
151 151
 {
152 152
 
153
+
153 154
     if(target) {
154 155
 	if(target >= TARGET_TABLE_SIZE) {
155 156
 	    cli_errmsg("Bad target in signature (%s)\n", virname);
156 157
 	    return 0;
157
-	} else if(ftype) {
158
+	} else {
158 159
 	    if(targettab[target] != ftype) {
159 160
 		cli_dbgmsg("Type: %d, expected: %d (%s)\n", ftype, targettab[target], virname);
160 161
 		return 0;