segfault on rfc2047-like subject
Matthias Andree
matthias.andree at gmx.de
Sat Oct 9 03:39:48 CEST 2004
David Relson <relson at osagesoftware.com> writes:
> Looking in string.h, I noticed a prototype for memmem() and tried using
> it in. However the compiler complained, so I wrong a quick/dirty
> version, which may be buggy. With your changes, it doesn't seen
> necessary, but I've attached the patch for your amusement.
Check the manpage, you need to #define _GNU_SOURCE early for the
function, and it's GLIBC specific. Given that GNU libc has several hefty
design flaws (NIS integration my pet peeve this week
http://sources.redhat.com/bugzilla/show_bug.cgi?id=430), I'm not too
inclined to use this.
I have a debugged memstr ready to commit, interface:
/** find needle in haystack (which is treated as unsigned char *). */
void *memstr(const void *haystack, size_t n, const unsigned char *needle);
This is a bit lower than word_t-compared-against-str. As this doesn't
make sense in word_t (which is opaque, but we're fiddling with its
internals), I've dubbed it memstr not word_str.
> In a bit, I'm going to go listen to the presidential debate. It's
> kind of amusing to hear Bush and Kerry together. The way they dodge
> questions makes you think they could walk through a hurricane and not
> get wet.
Let's not take politics onto this developer list unless they affect
bogofilter directly.
--
Matthias Andree
Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)
More information about the bogofilter-dev
mailing list