[libvirt] [PATCH] virFileNBDDeviceAssociate: Avoid use of uninitialized variable

The @qemunbd variable can be used uninitialized. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- Pushing under trivial and build breaker rules. src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 2b07ac9..7af0843 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -732,7 +732,7 @@ int virFileNBDDeviceAssociate(const char *file, char **dev) { char *nbddev; - char *qemunbd; + char *qemunbd = NULL; virCommandPtr cmd = NULL; int ret = -1; const char *fmtstr = NULL; -- 1.8.1.5

On Wed, Sep 04, 2013 at 08:59:42AM +0200, Michal Privoznik wrote:
The @qemunbd variable can be used uninitialized.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ---
Pushing under trivial and build breaker rules.
FYI this bug is considered a security issue if the polkit ACL driver is active and the user has restricted permissions It is assigned CVE-2013-4297 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 :|
participants (2)
-
Daniel P. Berrange
-
Michal Privoznik