-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/11/2010 04:45 PM, Martin Spuetz wrote:
> my qmail-smtpd creates segfaults. I think it has something to do with
> the shared library.
> 
> I created a few lines c code to reproduce the problem (to show what i
> have in qmail-smtpd).
> 
> test.c:
> #include <stdio.h>
> 
> #include "/home/vpopmail/include/vpopmail/vpopmail.h"
> #include "/home/vpopmail/include/vpopmail/vauth.h"
> #include "/home/vpopmail/include/vpopmail/vpopmail_config.h"
> 
> int main()
> {
>     if (valias_select("info", "rumtun.de") != NULL) {

valias_select calls vget_assign, which in turn modifies the domain
field for its purposes.  Because you're providing a pointer to a
read-only portion of memory, that's one reason why you might be
segfaulting.

If you're going to write code that calls vpopmail API, be aware that
much of vpopmail's API will clobber data you pass to it.
- -- 
/*
    Matt Brookings <m...@inter7.com>       GnuPG Key FAE0672C
    Software developer                     Systems technician
    Inter7 Internet Technologies, Inc.     (815)776-9465
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvp0aUACgkQIwet2/rgZyyYvACfawOVLfc8ydr1J4UTw2C+kSiU
kuYAoIwReBR3Qs1Q48Pv2po+uVxhGQ+e
=yBSP
-----END PGP SIGNATURE-----

Reply via email to