Re: libesmtp-1.0.2 bug and patch for FreeBSD
Brian Stafford <[email protected]> Tue, 20 Jan 2004 16:44:26 +0000
| Newsgroups | gmane.comp.lib.libesmtp |
|---|---|
| Message-ID | <[email protected]> |
On 2004.01.19 19:46, Pawel Salek wrote: > On 01/20/2004 07:48:27 PM, John Merryweather Cooper wrote: >> Version 1.0.2 works after a little hacking on FreeBSD: >> >> Patch: patch-smpt-tls.c >> >> FreeBSD does not have a memrchr() [not POSIX] and so a home-grown >> one is cobbled into the code with the patch. FreeBSD does have a >> strrchr() for C-strings. > > Wouldn't it be the best to use strrchr() throughout entire code then? The components of the domain name are compared right to left. The dots in the string containing the domain name would have to be overwritten with nul characters for strrchr() to be useful in this context, or a special purpose function written. Better to use something else (at least mostly standard) from the C library. Brian