oddity.

michael at optusnet.com.au michael at optusnet.com.au
Mon Apr 14 07:12:54 CEST 2003


In bogofilter.c:
    /* tokenize input text and save words in a wordhash. */
    do {
        collect_words(&wordhash, &wordcount, &cont);
        ++msgcount;
    } while(cont);
                                                                                                                                                        
Shouldn't that be free'ing wordhash somewhere before it overwrites it?

Secondly, calling bogofilter(double *) twice isn't safe. It gives
different results depending on how often it's been called.  This is
puzzling to me. Anyone know why that would be so??

[root db]# (echo spam/8/1048940498 ; echo spam/8/1048945768) | bogofilter -c /tmp/bogofilter.cf -d d/0 -v -b
spam/8/1048940498 X-Bogosity: No, tests=bogofilter, spamicity=0.841708, version=0.11.1.8
spam/8/1048945768 X-Bogosity: No, tests=bogofilter, spamicity=0.637994, version=0.11.1.8
[root db]# (echo spam/8/1048945768 ; echo spam/8/1048940498) | bogofilter -c /tmp/bogofilter.cf -d d/0 -v -b
spam/8/1048945768 X-Bogosity: No, tests=bogofilter, spamicity=0.787672, version=0.11.1.8
spam/8/1048940498 X-Bogosity: No, tests=bogofilter, spamicity=0.821849, version=0.11.1.8

most curious. (the '-b' flag just says to call bogofilter for each
file on STDIN).

Michael, reading source.




More information about the Bogofilter mailing list