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] Allocation buffers for NSS result construction


On 05/16/2017 06:26 PM, DJ Delorie wrote:

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...

Oh. Well. I don't think I want to paper over *that*. A crash in strlen seems to be just fine, rather than ignoring the issue and perhaps returning grossly misleading data.

Thanks,
Florian


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