[opendmarc-users] Use of MAXHOSTNAMELEN in opendmarc

Christophe Wolfhugel chris at wolfhugel.eu
Mon Mar 23 08:33:09 PDT 2015


Good Afternoon.

Shouldn't opendmarc completely stop using MAXHOSTNAMELEN in its code
(and eventually switch to DMARC_MAXHOSTNAMELEN) everywhere?

There are still a few locations where the system defined constant is
used:

./opendmarc/opendmarc.c:        char                    cctx_host[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc.c:        char                    cctx_helo[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc.c:        char                    cctx_rawmfrom[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc.c:char myhostname[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc.c:        char ipbuf[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc.c:        unsigned char pdomain[MAXHOSTNAMELEN + 1];
./opendmarc/opendmarc-ar.h:     unsigned char   ares_host[DMARC_MAXHOSTNAMELEN + 1];

And with a value of 64 this is quite small, particularly for cctx_rawmfrom
where the envelope from is on quite some occasions larger than 64 characters.

Any opinions on this, and I'll happily open a SF ticket based on the
feedback.

-- 
Christophe Wolfhugel  -+-  chris at wolfhugel.eu


More information about the opendmarc-users mailing list