avoid holes in often used data structures (bb#748);

git-svn: trunk@3495
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent 206865af0a
commit 9381324adf
  1. 5
      ChangeLog
  2. 6
      libclamav/filetypes.h
  3. 14
      libclamav/matcher-ac.h
  4. 4
      libclamav/matcher-bm.h
  5. 4
      libclamav/matcher.h

@ -1,3 +1,8 @@
Thu Jan 10 20:08:58 CET 2008 (tk)
---------------------------------
* libclamav: avoid holes in often used data structures (bb#748);
thanks to Edwin
Thu Jan 10 18:33:26 CET 2008 (tk)
---------------------------------
* shared/misc.c: don't pass --rsrc flag to ditto (bb#380)

@ -83,16 +83,16 @@ struct cli_ftype {
cli_file_t type;
uint32_t offset;
unsigned char *magic;
uint16_t length;
char *tname;
struct cli_ftype *next;
uint16_t length;
};
struct cli_matched_type {
cli_file_t type;
struct cli_matched_type *next;
off_t offset;
cli_file_t type;
unsigned short cnt;
struct cli_matched_type *next;
};
cli_file_t cli_ftcode(const char *name);

@ -30,34 +30,34 @@
extern uint8_t cli_ac_mindepth, cli_ac_maxdepth;
struct cli_ac_data {
uint32_t partsigs;
int32_t ***offmatrix;
uint32_t partsigs;
};
struct cli_ac_alt {
uint8_t chmode;
unsigned char *str;
uint16_t len, num;
struct cli_ac_alt *next;
uint16_t len, num;
uint8_t chmode;
};
struct cli_ac_patt {
uint16_t *pattern, *prefix, length, prefix_length;
uint8_t depth;
uint32_t mindist, maxdist;
char *virname, *offset;
uint32_t sigid;
char *virname, *offset;
uint16_t parts, partno, alt, alt_pattern;
struct cli_ac_alt **alttable;
struct cli_ac_patt *next, *next_same;
uint8_t depth;
uint8_t target;
uint16_t type;
struct cli_ac_patt *next, *next_same;
};
struct cli_ac_node {
uint8_t leaf, final;
struct cli_ac_patt *list;
struct cli_ac_node **trans, *fail;
uint8_t leaf, final;
};
#include "matcher.h"

@ -25,11 +25,11 @@
struct cli_bm_patt {
unsigned char *pattern, *prefix;
uint16_t length, prefix_length;
char *virname, *offset;
uint8_t target;
struct cli_bm_patt *next;
uint16_t length, prefix_length;
uint16_t cnt;
uint8_t target;
};
int cli_bm_addpatt(struct cli_matcher *root, struct cli_bm_patt *pattern);

@ -55,10 +55,10 @@ struct cli_matcher {
};
struct cli_meta_node {
int csize, size, method;
unsigned int crc32, fileno, encrypted, maxdepth;
char *filename, *virname;
struct cli_meta_node *next;
int csize, size, method;
unsigned int crc32, fileno, encrypted, maxdepth;
};
#define CL_TARGET_TABLE_SIZE 7

Loading…
Cancel
Save