This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Allocation buffers for NSS result construction
- From: DJ Delorie <dj at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 16 May 2017 12:26:11 -0400
- Subject: Re: [PATCH] Allocation buffers for NSS result construction
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5E4D280467
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5E4D280467
Florian Weimer <fweimer@redhat.com> writes:
>> I would recommend a few comments defining the behavior if NULL is passed
>> as a thing to copy - the NSS testsuite needed to preserve such
>> "mistakes" in the test data.
>
> Hmm. It's undefined because of the memcpy. I'm not sure if I want to
> change that, it would need a mostly pointless pointer comparison before
> the memcpy call.
I was thinking of strlen et al...
In my nss patch, I had to support both NULL pointers and pointers to
empty strings as "valid", which made me wonder...