Re: [libvirt] [PATCH v2 4/4] libvirt-: Check caller-provided buffers to be NULL with size > 0

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:32AM +0100, Erik Skultety wrote: > Pre-Glib era which used malloc allowed the size of the client-side > buffers to be declared as 0, because malloc documents that it can either > return 0 or a unique pointer on 0 size allocations. > With glib this doesn't work anymore,

[libvirt] [PATCH v2 4/4] libvirt-: Check caller-provided buffers to be NULL with size > 0

2019-11-21 Thread Erik Skultety
Pre-Glib era which used malloc allowed the size of the client-side buffers to be declared as 0, because malloc documents that it can either return 0 or a unique pointer on 0 size allocations. With glib this doesn't work anymore, because glib documents that for such allocation requests NULL is alway