QDBM and transactions

Stefan Bellon sbellon at sbellon.de
Sun Oct 31 23:34:01 CET 2004


Matthias Andree wrote:
> Stefan Bellon <sbellon at sbellon.de> writes:

> > I hereby put it under the GNU GPL and you can include it together
> > with some notes in the 0.93.0 release (after some testing ;-)

> Please do not include anything below the signature. If you want to
> avoid something being cited without extra effort, send it as a
> text/plain attachment.

It *was* an attachment with content type text/plain. The Content-Type
in the main header was declared as:

Content-Type: MULTIPART/MIXED; BOUNDARY="4d0635b7efpKctl4ABfsWgdmapx2ux1/"

And the attachment came after the body (separated with the announced
boundary) and started (again with the announced boundary):

--4d0635b7efpKctl4ABfsWgdmapx2ux1/
Content-Type: text/plain; Name="qdbm_dp2vl.c"

I don't see anything wrong with that.

> Anyways, I was going to say that your malloc() size is bogus and
> would cause a segfault on Unix, for strlen() does not include the
> trailing NUL byte. malloc(strlen(s)+4) makes room for the string plus
> 3 characters!

Yes, you're right. This is because I used "new" instead of "-new" in my
first try and forgot to add this character. Another good reason never
to use literals directly in the code but always declare them as
constants or use macros instead.

> I'll polish the code a bit and stuff it into CVS with a license
> header added, I'll dub it bogoQDBMconvert. Someone should then look
> into making bogoupgrade aware of your program.

Ok, thanks.

-- 
Stefan Bellon



More information about the bogofilter-dev mailing list