Latest Time Machine Patch
jra at samba.org
Sat Sep 30 00:27:03 UTC 2017
On Fri, Sep 29, 2017 at 07:21:46PM -0500, Omri Mor wrote:
> This was discussed previously. Did you read the warning I put in the top of the file?
> * Avahi aborts on allocation failure (OOM),
> * unless a custom allocator which doesn't do so has been set.
> * This is particularly important for the avahi_string_list_*() functions,
> * which return NULL on allocation failure.
> * Since it should abort on allocation failure (before returning NULL),
> * we don't check the result.
> Adding in a check for NULL doesn’t matter, as it aborts long before we would see that NULL.
> In fact, the documentation doesn’t even state that it /can/ return NULL—I only found that out by reading the Avahi source.
Yes, I read the source to determine it can return NULL,
that's why I wanted the checks here.
I must have missed the previous discussion on this, 'cos
I'd never have agreed to ignore NULL checks on allocation
return. Just because the current allocator aborts doesn't
mean the newest-shiny-updated one also will.
Please add the explicit NULL checks, otherwise
we're going to get coverity false positives.
More information about the samba-technical