Re: [libvirt-glib] Add wrapper for volume deletion API

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

 



On Sat, Dec 03, 2011 at 12:11:04AM +0200, Zeeshan Ali (Khattak) wrote:
> On Fri, Dec 2, 2011 at 6:34 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> > On Fri, Dec 02, 2011 at 05:34:15PM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> >>
> >> +    if (virStorageVolDelete(vol->priv->handle, flags) < 0) {
> >> +        g_set_error (err,
> >> +                     GVIR_STORAGE_VOL_ERROR,
> >> +                     0,
> >> +                     "Unable to delete storage volume");
> >
> > I think gvir_error_new_literal should be used here
> 
>   g_set_error() checks if error is NULL and doesn't set the error if so.

You actually want   gvir_set_error_literal(), to avoid potential format
string vulnerabilities from bogus translations.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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