This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nss_dns: Adjust ns_name_ntop failure handling in getnetby*


Florian Weimer <fweimer@redhat.com> writes:
> -      if (n > 0 && bp[0] == '.')
> -	bp[0] = '\0';
> -

> +      if (bp[0] == '.')
> +	bp[0] = '\0';

This now references bp[0] when n == 0, which it didn't before.  But,
ns_name_ntop always nul terminates the buffer, so bp[0] is always
well-defined.  OK.  What about the case where __ns_name_unpack() returns
zero?  It looks like that might have been a bug in the old version?

Otherwise LGTM.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]