[Pymilter] Small bug in py-milter on FreeBSD

Gerhard Schmidt estartu at augusta.de
Tue Nov 8 08:39:26 EST 2016


Am 08.11.2016 um 14:19 schrieb Stuart D. Gathman:
> On Tue, 8 Nov 2016, Gerhard Schmidt wrote:
> 
>>> I will try to include the patch in the FreeBSD Port to fix the actual
>>> version. But please include the fix in future releases.
> 
> I've pushed that to master.  BUT, surely there is a reliable way to
> test that the necessary definitions have been included, and give
> a compile error?  Where exactly did it crash without arpa/inet?  We
> could target whatever was missing.
> 

If the file isn't included the following warnings are generated.

miltermodule.c:745:18: warning: implicit declaration of function
'inet_ntop' is invalid in C99 [-Wimplicit-function-declaration]
        const char *s = inet_ntop(AF_INET6, &addr->sin6_addr, buf,
sizeof buf);
                        ^
miltermodule.c:745:14: warning: incompatible integer to pointer
conversion initializing 'const char *' with an expression of type 'int'
      [-Wint-conversion]
        const char *s = inet_ntop(AF_INET6, &addr->sin6_addr, buf,
sizeof buf);
                    ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

The crash is in the following line while trying to convert s to a python
string.

Regards
   Estartu


<!DSPAM:1584401B0AC857322535139>




More information about the Pymilter mailing list