[libvirt] [PATCH v2] lxc: Clang is complaining about possible NULL pointer.

Martin Kletzander mkletzan at redhat.com
Thu Nov 8 08:51:46 UTC 2018


On Wed, Nov 07, 2018 at 04:23:47PM -0500, John Ferlan wrote:
>
>
>On 11/7/18 3:57 PM, Julio Faracco wrote:
>> The array "mount" inside lxc_container is not being checked before for
>> loop. Clang syntax scan is complaining about this segmentation fault.
>>
>> Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
>> ---
>>  src/lxc/lxc_container.c | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>>
>
>Reviewed-by: John Ferlan <jferlan at redhat.com>
>(and pushed)
>
>John
>
>FWIW:
>Ironically Coverity never complained about this one even though it's in
>the category of things Coverity doesn't like either ;-)
>

My guess is that coverity was clever enough to know that thing can never happen
(it could happen only if nmounts is non-zero and mounts is NULL).

>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181108/c7d3ac7b/attachment-0001.sig>


More information about the libvir-list mailing list