On Fri, Sep 25, 2015, at 18:05, Ondřej Surý wrote: > Hi Ellie, > > On Fri, Sep 25, 2015, at 03:32, ellie timoney wrote:
> > > +#ifndef MAXHOSTNAMELEN > > > +#define MAXHOSTNAMELEN > > > +#endif > > > + > > > > MAXHOSTNAMELEN is used here: > > > > > static char popd_apop_chal[45 + MAXHOSTNAMELEN + 1]; /* > > > <rand.time@hostname> */ > > > > Currently, if MAXHOSTNAMELEN is undefined, that's a compilation failure. > > > > This change will maybe allow compilation to succeed, in which case > > popd_apop_chal might be too short, resulting in a misleading run time > > error from sasl_mkchal(). > > > > Or maybe it won't build, depending on how the empty MAXHOSTNAMELEN > > between two additions gets interpreted, resulting in an equally > > misleading compile time error. > > > > The rest of this patch looks okay, but if we're going to compensate for > > a missing MAXHOSTNAMELEN I'd want a reasonable value in there. > > Thoughts? (FWIW: looks like it's 64 on Debian, 256 on OS X.) > > It caught my eye as well, but I haven't given it enough thought. > > It should definitely be: > > +#ifndef MAXHOSTNAMELEN > +#define MAXHOSTNAMELEN 256 > +#endif > > or 64? There's only one of them - prefer big - so 256. It's not going to hurt if you're wrong. Bron. -- Bron Gondwana br...@fastmail.fm