fix handling of bfs_last (bb#713)

git-svn: trunk@3381
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent 7934b61708
commit a2f9787784
  1. 4
      ChangeLog
  2. 6
      libclamav/matcher-ac.c

@ -1,3 +1,7 @@
Thu Dec 6 15:39:11 CET 2007 (tk)
---------------------------------
* libclamav/matcher-ac.c: fix handling of bfs_last (bb#713)
Thu Dec 6 15:29:00 CET 2007 (tk)
---------------------------------
* libclamav/others.c: bump f-level

@ -204,7 +204,7 @@ static int bfs_enqueue(struct bfs_list **bfs, struct bfs_list **last, struct cli
return CL_SUCCESS;
}
static struct cli_ac_node *bfs_dequeue(struct bfs_list **bfs)
static struct cli_ac_node *bfs_dequeue(struct bfs_list **bfs, struct bfs_list **last)
{
struct bfs_list *lpt;
struct cli_ac_node *pt;
@ -215,6 +215,8 @@ static struct cli_ac_node *bfs_dequeue(struct bfs_list **bfs)
} else {
*bfs = (*bfs)->next;
pt = lpt->node;
if(lpt == *last)
*last = NULL;
free(lpt);
return pt;
}
@ -239,7 +241,7 @@ static int ac_maketrans(struct cli_matcher *root)
}
}
while((node = bfs_dequeue(&bfs))) {
while((node = bfs_dequeue(&bfs, &bfs_last))) {
if(node->leaf)
continue;

Loading…
Cancel
Save