Web lists-archives.com

Re: [PATCH v2] xgethostname: handle long hostnames




David Turner <David.Turner@xxxxxxxxxxxx> writes:

> If the writer has the smaller HOST_NAME_MAX, this will work fine.  If the reader
> has the smaller HOST_NAME_MAX, and the writer's actual value is too long,
> then there's no way the strcmp would succeed anyway.  So I don't think we need
> to worry about it.

Hmph, I have to agree with that reasoning, only because the value we
read into locking_host[] is not used for error reporting at all.  I
would have insisted to read what is on the filesystem anyway if that
were not the case.

Thanks.