git-svn: trunk@385
remotes/push_mirror/metadata
Tomasz Kojm 22 years ago
parent 13d4160d15
commit 8515ab9ee2
  1. 6
      clamav-devel/ChangeLog
  2. 1
      clamav-devel/clamscan/manager.c
  3. 15
      clamav-devel/libclamav/matcher.c
  4. 8
      clamav-devel/libclamav/str.c
  5. 2
      clamav-devel/libclamav/str.h
  6. 2
      clamav-devel/libclamav/unrarlib.h
  7. 1
      clamav-devel/sigtool/sigtool.c

@ -1,3 +1,9 @@
Tue Mar 9 23:49:06 CET 2004 (tk)
---------------------------------
* libclamav, sigtool: small code cleanups (Dirk Mueller <mueller*kde.org>)
* libclamav: unrarlib: properly detect little endian (Dirk Mueller)
* clamscan: do not print "Excluded" messages with -i (reported by Gordon E.)
Tue Mar 9 12:36:10 GMT 2004 (trog) Tue Mar 9 12:36:10 GMT 2004 (trog)
----------------------------------- -----------------------------------
* clamd/others.c: fix includes * clamd/others.c: fix includes

@ -309,6 +309,7 @@ int scanfile(const char *filename, struct cl_node *root, const struct passwd *us
if(procdev) if(procdev)
if(stat(filename, &sb) != -1) if(stat(filename, &sb) != -1)
if(sb.st_dev == procdev) { if(sb.st_dev == procdev) {
if(!printinfected)
mprintf("%s: Excluded (/proc).\n", filename); mprintf("%s: Excluded (/proc).\n", filename);
return 0; return 0;
} }

@ -79,7 +79,7 @@ int cli_addpatt(struct cl_node *root, struct cli_patt *pattern)
return 0; return 0;
} }
int cli_enqueue(struct nodelist **bfs, struct cl_node *n) static int cli_enqueue(struct nodelist **bfs, struct cl_node *n)
{ {
struct nodelist *new; struct nodelist *new;
@ -95,7 +95,7 @@ int cli_enqueue(struct nodelist **bfs, struct cl_node *n)
return 0; return 0;
} }
struct cl_node *cli_dequeue(struct nodelist **bfs) static struct cl_node *cli_dequeue(struct nodelist **bfs)
{ {
struct nodelist *handler, *prev = NULL; struct nodelist *handler, *prev = NULL;
struct cl_node *pt; struct cl_node *pt;
@ -121,7 +121,7 @@ struct cl_node *cli_dequeue(struct nodelist **bfs)
} }
} }
int cli_maketrans(struct cl_node *root) static int cli_maketrans(struct cl_node *root)
{ {
struct nodelist *bfs = NULL; struct nodelist *bfs = NULL;
struct cl_node *child, *node; struct cl_node *child, *node;
@ -164,7 +164,7 @@ int cl_buildtrie(struct cl_node *root)
return cli_maketrans(root); return cli_maketrans(root);
} }
void cli_freepatt(struct cli_patt *list) static void cli_freepatt(struct cli_patt *list)
{ {
struct cli_patt *handler, *prev; struct cli_patt *handler, *prev;
@ -182,7 +182,7 @@ void cli_freepatt(struct cli_patt *list)
void cl_freetrie(struct cl_node *root) void cl_freetrie(struct cl_node *root)
{ {
int i; unsigned int i;
for(i = 0; i < root->nodes; i++) { for(i = 0; i < root->nodes; i++) {
cli_freepatt(root->nodetable[i]->list); cli_freepatt(root->nodetable[i]->list);
@ -197,7 +197,8 @@ int cl_scanbuff(const char *buffer, unsigned int length, char **virname, const s
{ {
struct cl_node *current; struct cl_node *current;
struct cli_patt *pt; struct cli_patt *pt;
int i, position, *partcnt; int position, *partcnt;
unsigned int i;
current = (struct cl_node *) root; current = (struct cl_node *) root;
@ -248,7 +249,7 @@ int cli_findpos(const char *buffer, int offset, int length, const struct cli_pat
{ {
int bufferpos = offset + CL_MIN_LENGTH; int bufferpos = offset + CL_MIN_LENGTH;
int postfixend = offset + length; int postfixend = offset + length;
int i; unsigned int i;
for(i = CL_MIN_LENGTH; i < pattern->length; i++) { for(i = CL_MIN_LENGTH; i < pattern->length; i++) {

@ -20,6 +20,8 @@
#include "clamav-config.h" #include "clamav-config.h"
#endif #endif
#include "str.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -29,7 +31,7 @@
#include "others.h" #include "others.h"
#include "defaults.h" #include "defaults.h"
int cli_hex2int(int c) static int cli_hex2int(int c)
{ {
int l = tolower(c); int l = tolower(c);
@ -91,7 +93,7 @@ char *cl_str2hex(const char *string, unsigned int len)
char *hexstr; char *hexstr;
char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f' }; 'a', 'b', 'c', 'd', 'e', 'f' };
int i, j; unsigned int i, j;
if((hexstr = (char *) cli_calloc(2 * len + 1, sizeof(char))) == NULL) if((hexstr = (char *) cli_calloc(2 * len + 1, sizeof(char))) == NULL)
return NULL; return NULL;
@ -148,7 +150,7 @@ void cli_chomp(char *string)
* doesn't have <fieldno> fields or not enough memory is available. * doesn't have <fieldno> fields or not enough memory is available.
* The caller has to free() the result afterwards. * The caller has to free() the result afterwards.
*/ */
char *cli_strtok(const char *line, int fieldno, char *delim) char *cli_strtok(const char *line, int fieldno, const char *delim)
{ {
int counter = 0, i, j; int counter = 0, i, j;
char *buffer = NULL; char *buffer = NULL;

@ -21,6 +21,6 @@
int cli_strbcasestr(const char *haystack, const char *needle); int cli_strbcasestr(const char *haystack, const char *needle);
void cli_chomp(char *string); void cli_chomp(char *string);
char *cli_strtok(const char *line, int field, char *delim); char *cli_strtok(const char *line, int field, const char *delim);
#endif #endif

@ -80,7 +80,7 @@ extern "C"
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
/* detected by clamav/configure */ /* detected by clamav/configure */
#if WORDS_LITTLEENDIAN #if 1 - WORDS_BIGENDIAN
#define NON_INTEL_BYTE_ORDER #define NON_INTEL_BYTE_ORDER
#endif #endif

@ -80,6 +80,7 @@ int scanfile(const char *cmd, const char *str, const char *file)
while(fgets(buffer, LINE, pd)) { while(fgets(buffer, LINE, pd)) {
if(strstr(buffer, str)) { if(strstr(buffer, str)) {
free(command); free(command);
fclose(pd);
return 1; /* found */ return 1; /* found */
} }
} }

Loading…
Cancel
Save