Re: [libvirt] [PATCH] remote_internal.c: don't dereference a NULL "conn"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 02, 2009 at 11:58:07AM +0200, Jim Meyering wrote:
> Here's the test just before the else-if in the patch below:
> 
>     if (conn &&
>         conn->driver &&
>         STREQ (conn->driver->name, "remote")) {
> 
> So, in the else-branch, "conn" is guaranteed to be NULL.
> And dereferenced.
> 
> This may be only a theoretical risk, but if so,
> the test of "conn" above should be changed to an assertion,
> and/or the parameter should get the nonnull attribute.

  I'm fine with your patch, so that even if code around changes
having a gard is IMHO a good thing

  ACK

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]