git-svn: trunk@1282
Tomasz Kojm authored on 2005/01/27 02:45:25... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
2 |
+ * Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -294,7 +294,7 @@ int scanfd(const int fd, unsigned long int *scanned, const struct cl_node *root, |
294 | 294 |
|
295 | 295 |
int scanstream(int odesc, unsigned long int *scanned, const struct cl_node *root, const struct cl_limits *limits, int options, const struct cfgstruct *copt) |
296 | 296 |
{ |
297 |
- int ret, portscan = CL_DEFAULT_MAXPORTSCAN, sockfd, port, acceptd; |
|
297 |
+ int ret, portscan = CL_DEFAULT_MAXPORTSCAN, sockfd, port = 0, acceptd; |
|
298 | 298 |
int tmpd, bread, retval, timeout, btread, min_port, max_port; |
299 | 299 |
long int size = 0, maxsize = 0; |
300 | 300 |
short bound = 0, rnd_port_first = 1; |
... | ... |
@@ -49,7 +49,7 @@ pthread_mutex_t ctime_mutex = PTHREAD_MUTEX_INITIALIZER; |
49 | 49 |
int command(int desc, const struct cl_node *root, const struct cl_limits *limits, int options, const struct cfgstruct *copt, int timeout) |
50 | 50 |
{ |
51 | 51 |
char buff[1025]; |
52 |
- int bread, opt, ret, retval; |
|
52 |
+ int bread, opt, retval; |
|
53 | 53 |
struct cfgstruct *cpt; |
54 | 54 |
|
55 | 55 |
|
... | ... |
@@ -116,8 +116,7 @@ int dsresult(int sockd, const struct optstruct *opt) |
116 | 116 |
int dsfile(int sockd, const char *filename, const struct optstruct *opt) |
117 | 117 |
{ |
118 | 118 |
int ret; |
119 |
- char buff[4096], *scancmd, *pt; |
|
120 |
- FILE *fd; |
|
119 |
+ char *scancmd; |
|
121 | 120 |
|
122 | 121 |
|
123 | 122 |
scancmd = mcalloc(strlen(filename) + 20, sizeof(char)); |
... | ... |
@@ -503,7 +502,7 @@ void move_infected(const char *filename, const struct optstruct *opt) |
503 | 503 |
} |
504 | 504 |
|
505 | 505 |
if(stat(filename, &fstat) == -1) { |
506 |
- mprintf("@Can't stat file %s\n", movefilename); |
|
506 |
+ mprintf("@Can't stat file %s\n", filename); |
|
507 | 507 |
mprintf("Try to run clamdscan with clamd privileges\n"); |
508 | 508 |
notmoved++; |
509 | 509 |
return; |
... | ... |
@@ -10308,8 +10308,8 @@ else |
10308 | 10308 |
|
10309 | 10309 |
if test -n "$vuln"; then |
10310 | 10310 |
if test "$zlib_check" = "yes"; then |
10311 |
- { { echo "$as_me:$LINENO: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net" >&5 |
|
10312 |
-echo "$as_me: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net" >&2;} |
|
10311 |
+ { { echo "$as_me:$LINENO: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net. You can omit this check with --disable-zlib-vcheck but DO NOT REPORT any stablility issues then!" >&5 |
|
10312 |
+echo "$as_me: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net. You can omit this check with --disable-zlib-vcheck but DO NOT REPORT any stablility issues then!" >&2;} |
|
10313 | 10313 |
{ (exit 1); exit 1; }; } |
10314 | 10314 |
else |
10315 | 10315 |
{ echo "$as_me:$LINENO: WARNING: ****** This ClamAV installation may be linked against" >&5 |
... | ... |
@@ -110,7 +110,7 @@ else |
110 | 110 |
|
111 | 111 |
if test -n "$vuln"; then |
112 | 112 |
if test "$zlib_check" = "yes"; then |
113 |
- AC_MSG_ERROR(The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net) |
|
113 |
+ AC_MSG_ERROR(The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net. You can omit this check with --disable-zlib-vcheck but DO NOT REPORT any stablility issues then!) |
|
114 | 114 |
else |
115 | 115 |
AC_MSG_WARN([****** This ClamAV installation may be linked against]) |
116 | 116 |
AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any]) |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl> |
|
18 |
+# Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net> |
|
19 | 19 |
# |
20 | 20 |
# This program is free software; you can redistribute it and/or modify |
21 | 21 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -175,7 +175,7 @@ target_alias = @target_alias@ |
175 | 175 |
target_cpu = @target_cpu@ |
176 | 176 |
target_os = @target_os@ |
177 | 177 |
target_vendor = @target_vendor@ |
178 |
-EXTRA_DIST = clamdoc.pdf html man clamav-mirror-howto.pdf signatures.pdf MacOSX |
|
178 |
+EXTRA_DIST = clamdoc.pdf man clamav-mirror-howto.pdf signatures.pdf MacOSX |
|
179 | 179 |
man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5 |
180 | 180 |
all: all-am |
181 | 181 |
|
... | ... |
@@ -412,7 +412,7 @@ int downloaddb(const char *localname, const char *remotename, const char *hostna |
412 | 412 |
/* proxy support finshed by njh@bandsman.co.uk */ |
413 | 413 |
int wwwconnect(const char *server, const char *proxy, int pport, char *ip) |
414 | 414 |
{ |
415 |
- int socketfd, port, i; |
|
415 |
+ int socketfd = -1, port, i; |
|
416 | 416 |
struct sockaddr_in name; |
417 | 417 |
struct hostent *host; |
418 | 418 |
char ipaddr[16]; |
... | ... |
@@ -482,7 +482,6 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip) |
482 | 482 |
return socketfd; |
483 | 483 |
} |
484 | 484 |
|
485 |
- close(socketfd); |
|
486 | 485 |
return -2; |
487 | 486 |
} |
488 | 487 |
|
... | ... |
@@ -443,7 +443,7 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c |
443 | 443 |
if(ep == EC32(section_hdr[nsections - 1].PointerToRawData)) { |
444 | 444 |
lseek(desc, ep, SEEK_SET); |
445 | 445 |
if(read(desc, buff, 4096) == 4096) { |
446 |
- char *pt = cli_memstr(buff, 4040, "\x47\x65\x74\x50\x72\x6f\x63\x41\x64\x64\x72\x65\x73\x73\x00", 15); |
|
446 |
+ const char *pt = cli_memstr(buff, 4040, "\x47\x65\x74\x50\x72\x6f\x63\x41\x64\x64\x72\x65\x73\x73\x00", 15); |
|
447 | 447 |
if(pt) { |
448 | 448 |
uint32_t dw1, dw2; |
449 | 449 |
|
... | ... |
@@ -49,10 +49,12 @@ |
49 | 49 |
#include "output.h" |
50 | 50 |
#include "cfgparser.h" |
51 | 51 |
#include "misc.h" |
52 |
+#include "vba.h" |
|
52 | 53 |
#include "../clamscan/others.h" |
53 | 54 |
#include "../libclamav/others.h" |
54 | 55 |
#include "../libclamav/str.h" |
55 |
-#include "vba.h" |
|
56 |
+#include "../libclamav/ole2_extract.h" |
|
57 |
+#include "../libclamav/htmlnorm.h" |
|
56 | 58 |
|
57 | 59 |
#ifndef O_BINARY |
58 | 60 |
#define O_BINARY 0 |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
#include "../libclamav/vba_extract.h" |
31 | 31 |
#include "../libclamav/others.h" |
32 | 32 |
#include "../libclamav/cltypes.h" |
33 |
+#include "../libclamav/ole2_extract.h" |
|
33 | 34 |
|
34 | 35 |
typedef struct mac_token_tag |
35 | 36 |
{ |
... | ... |
@@ -44,6 +45,8 @@ typedef struct mac_token2_tag |
44 | 44 |
|
45 | 45 |
} mac_token2_t; |
46 | 46 |
|
47 |
+int sigtool_vba_scandir(const char *dirname, int hex_output); |
|
48 |
+ |
|
47 | 49 |
static char *get_unicode_name (char *name, int size) |
48 | 50 |
{ |
49 | 51 |
int i, j; |
... | ... |
@@ -897,7 +900,7 @@ static int sigtool_scandir (const char *dirname, int hex_output) |
897 | 897 |
char *fname; |
898 | 898 |
const char *tmpdir; |
899 | 899 |
char *dir; |
900 |
- int retval, ret = CL_CLEAN, desc; |
|
900 |
+ int ret = CL_CLEAN, desc; |
|
901 | 901 |
|
902 | 902 |
|
903 | 903 |
if ((dd = opendir (dirname)) != NULL) { |