fix handling of nodes which also match single bytes (bb#1054)

git-svn: trunk@3890
remotes/push_mirror/metadata
Tomasz Kojm 17 years ago
parent 32c0c32eee
commit 746bc18177
  1. 5
      ChangeLog
  2. 2
      libclamav/matcher-ac.c
  3. 2
      libclamav/others.c

@ -1,3 +1,8 @@
Fri Jun 13 13:10:15 CEST 2008 (tk)
----------------------------------
* libclamav/matcher-ac.c: fix handling of nodes which also match single
bytes (bb#1054)
Fri Jun 13 02:01:15 CEST 2008 (tk)
----------------------------------
* shared/cfgparser.c: handle memory errors in OPT_COMPSIZE

@ -126,7 +126,7 @@ int cli_ac_addpatt(struct cli_matcher *root, struct cli_ac_patt *pattern)
ph = pt->list;
while(ph) {
if((ph->length == pattern->length) && (ph->prefix_length == pattern->prefix_length)) {
if((ph->length == pattern->length) && (ph->prefix_length == pattern->prefix_length) && (ph->ch[0] == pattern->ch[0]) && (ph->ch[1] == pattern->ch[1])) {
if(!memcmp(ph->pattern, pattern->pattern, ph->length * sizeof(uint16_t)) && !memcmp(ph->prefix, pattern->prefix, ph->prefix_length * sizeof(uint16_t))) {
if(!ph->alt && !pattern->alt) {
match = 1;

@ -87,7 +87,7 @@ static pthread_mutex_t cli_ctime_mutex = PTHREAD_MUTEX_INITIALIZER;
#define P_tmpdir "C:\\WINDOWS\\TEMP"
#endif
#define CL_FLEVEL 31 /* don't touch it */
#define CL_FLEVEL 32 /* don't touch it */
uint8_t cli_debug_flag = 0, cli_leavetemps_flag = 0;

Loading…
Cancel
Save