Browse code

sigtool/sigtool.c: fix quirks with .cdiff generation (bb#1395)

git-svn: trunk@4939

Tomasz Kojm authored on 2009/03/13 21:19:30
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Mar 13 13:21:36 CET 2009 (tk)
2
+---------------------------------
3
+ * sigtool/sigtool.c: fix quirks with .cdiff generation (bb#1395)
4
+
1 5
 Fri Mar 13 11:58:38 CET 2009 (tk)
2 6
 ---------------------------------
3 7
  * libclamav/others.c: move cli_gentemp*() to others_common.c
... ...
@@ -67,7 +67,7 @@
67 67
 /*
68 68
  * Force backward compatibility with the cdiff interpreter of clamav < 0.95
69 69
  */
70
-#define COMPATIBILITY_LIMIT 896
70
+#define COMPATIBILITY_LIMIT 980
71 71
 
72 72
 static const struct dblist_s {
73 73
     const char *name;
... ...
@@ -1371,14 +1371,6 @@ static int compare(const char *oldpath, const char *newpath, FILE *diff)
1371 1371
 	    return -1;
1372 1372
 	}
1373 1373
 	cli_chomp(nbuff);
1374
-#ifdef COMPATIBILITY_LIMIT
1375
-	if(strlen(nbuff) > COMPATIBILITY_LIMIT) {
1376
-	    mprintf("!compare: COMPATIBILITY_LIMIT: Found too long line in new %s\n", newpath);
1377
-	    if(old)
1378
-		fclose(old);
1379
-	    return -1;
1380
-	}
1381
-#endif
1382 1374
 	if(!old) {
1383 1375
 	    fprintf(diff, "ADD %s\n", nbuff);
1384 1376
 	} else {
... ...
@@ -1431,6 +1423,14 @@ static int compare(const char *oldpath, const char *newpath, FILE *diff)
1431 1431
 		fprintf(diff, "ADD %s\n", nbuff);
1432 1432
 	    }
1433 1433
 	}
1434
+#ifdef COMPATIBILITY_LIMIT
1435
+       if(strlen(nbuff) > COMPATIBILITY_LIMIT) {
1436
+           mprintf("!compare: COMPATIBILITY_LIMIT: Found too long line in new %s\n", newpath);
1437
+           if(old)
1438
+               fclose(old);
1439
+           return -1;
1440
+       }
1441
+#endif
1434 1442
     }
1435 1443
 
1436 1444
     if(old) {