git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1152 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/12/02 05:11:17... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Wed Dec 1 21:05:07 CET 2004 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav/scanners.c: improved recursion limits (thanks to Maxim Dounin) |
|
4 |
+ |
|
1 | 5 |
Wed Dec 1 13:14:33 GMT 2004 (njh) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/mbox.c: Decode text/plain parts marked as being encoded, |
... | ... |
@@ -1305,6 +1305,7 @@ int cli_magic_scandesc(int desc, const char **virname, long int *scanned, const |
1305 | 1305 |
} else if(nret >= CL_TYPENO) { |
1306 | 1306 |
lseek(desc, 0, SEEK_SET); |
1307 | 1307 |
|
1308 |
+ nret == CL_TYPE_MAIL ? (*mrec)++ : (*arec)++; |
|
1308 | 1309 |
switch(nret) { |
1309 | 1310 |
case CL_TYPE_HTML: |
1310 | 1311 |
if(SCAN_HTML) |
... | ... |
@@ -1318,6 +1319,7 @@ int cli_magic_scandesc(int desc, const char **virname, long int *scanned, const |
1318 | 1318 |
return CL_VIRUS; |
1319 | 1319 |
break; |
1320 | 1320 |
} |
1321 |
+ nret == CL_TYPE_MAIL ? (*mrec)-- : (*arec)--; |
|
1321 | 1322 |
} |
1322 | 1323 |
} |
1323 | 1324 |
|
... | ... |
@@ -1338,7 +1340,7 @@ int cli_magic_scandesc(int desc, const char **virname, long int *scanned, const |
1338 | 1338 |
(*arec)--; |
1339 | 1339 |
|
1340 | 1340 |
if(ret == CL_EFORMAT) { |
1341 |
- cli_warnmsg("Descriptor[%d]: %s\n", desc, cl_strerror(CL_EFORMAT)); |
|
1341 |
+ cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(CL_EFORMAT)); |
|
1342 | 1342 |
return CL_CLEAN; |
1343 | 1343 |
} else { |
1344 | 1344 |
return ret; |
... | ... |
@@ -45,17 +45,15 @@ const char *freshdbdir(void) |
45 | 45 |
dbdir = cl_retdbdir(); |
46 | 46 |
if((copt = parsecfg(CONFDIR"/clamd.conf", 0))) { |
47 | 47 |
if((cpt = cfgopt(copt, "DatabaseDirectory")) || (cpt = cfgopt(copt, "DataDirectory"))) { |
48 |
- if(strcmp(cl_retdbdir(), cpt->strarg)) { |
|
49 |
- char *daily = (char *) mmalloc(strlen(cpt->strarg) + strlen(cl_retdbdir()) + 15); |
|
48 |
+ if(strcmp(dbdir, cpt->strarg)) { |
|
49 |
+ char *daily = (char *) mmalloc(strlen(cpt->strarg) + strlen(dbdir) + 15); |
|
50 | 50 |
sprintf(daily, "%s/daily.cvd", cpt->strarg); |
51 | 51 |
if((d1 = cl_cvdhead(daily))) { |
52 |
- sprintf(daily, "%s/daily.cvd", cl_retdbdir()); |
|
52 |
+ sprintf(daily, "%s/daily.cvd", dbdir); |
|
53 | 53 |
if((d2 = cl_cvdhead(daily))) { |
54 | 54 |
free(daily); |
55 | 55 |
if(d1->version > d2->version) |
56 | 56 |
dbdir = cpt->strarg; |
57 |
- else |
|
58 |
- dbdir = cl_retdbdir(); |
|
59 | 57 |
cl_cvdfree(d2); |
60 | 58 |
} else { |
61 | 59 |
free(daily); |
... | ... |
@@ -64,7 +62,6 @@ const char *freshdbdir(void) |
64 | 64 |
cl_cvdfree(d1); |
65 | 65 |
} else { |
66 | 66 |
free(daily); |
67 |
- dbdir = cl_retdbdir(); |
|
68 | 67 |
} |
69 | 68 |
} |
70 | 69 |
} |