From nobody Tue May 13 20:06:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1528488852547886.3641056063377; Fri, 8 Jun 2018 13:14:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD1C230001E5; Fri, 8 Jun 2018 20:14:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1A917046B; Fri, 8 Jun 2018 20:14:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 957784CA80; Fri, 8 Jun 2018 20:14:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w58KCQxS013186 for ; Fri, 8 Jun 2018 16:12:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id B27C4854AD; Fri, 8 Jun 2018 20:12:26 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABCE8854A0 for ; Fri, 8 Jun 2018 20:12:24 +0000 (UTC) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 089115D698 for ; Fri, 8 Jun 2018 20:12:13 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id c198-v6so9510203qkg.12 for ; Fri, 08 Jun 2018 13:12:12 -0700 (PDT) Received: from localhost.localdomain ([187.107.161.168]) by smtp.gmail.com with ESMTPSA id a64-v6sm39583457qkd.7.2018.06.08.13.12.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jun 2018 13:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=QraU376O/GQ11czbavxVWx2rv35F9c6alBOEJsTuhgg=; b=QtwJPuJYorYWtho4CvKv5lM+tk44rtckj1RcK4h68pP6VbJVfQCw7BK4YnctKv1oPf yxMS+2czDYwJWD/nmpEH7pPu3NoXkRsBAFfQ2N8DlvzK2E5SR5L8oPWD/rqVJYSOZq/n /WaRWBtRJrwqCLpPOLz69VID8zOP7RXlwLVHwrI16cjNncD/Sh+U4uhwMFZnvfv6V0yO WUcvHLiEBXsyFUG7zUU9tdllaOaGYa2/tPRLKjzoneFP80MDe1bAcEYu52bw8MQm0LPu AsbS5krrger+4GRTgtr6JAPeBBaEQKPLkkHNEwl/0GvuvI4+74qJVDLLIb9lqzUcxylA lQew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=QraU376O/GQ11czbavxVWx2rv35F9c6alBOEJsTuhgg=; b=iEIgcgqfLrqADMOH1Jy+LUujT5I8ipx3j50YpqiC82+uzSauF07XJbAw1xphPZ487T fhvsOSCOydXuRUAJcsTHGCYVyjTKRCCFaBxBdJNuFA/w9Twy1pp1i1V+fTtwEESEcpoN cGGaT8ybC9nRS43OjlYfaXh+1RL/jzBNtJ1P2uouOegF5M15pCzdNDqLPFF3ucMfIqqv uk8DMmivUUYJ9LGcpaUDuOdr0gSPPidzdOn6agTBptliLYrK32EULXmmXJevPzMVLjdU ZqeO6/EgP7Cnh2FjtcW3gae0A+5sWNC+cdRxLYBcZqiBtQMzMs6kL7d/Mjrtv7xSOYek KPmA== X-Gm-Message-State: APt69E3EkQnqjFhu4Gvk72koxDIvthfP2MF6oiddCzAFBh1Bno+Wn05+ 9t2vWvOgMc6cNrVgXE7Uk83bAg== X-Google-Smtp-Source: ADUXVKKatXCK7j7y5eTt4s6bE4gCFnF6CIN5tW8IB4NNIgUZU19k2/7TqReWpVagmOaDAxyaxgtBzA== X-Received: by 2002:a37:e102:: with SMTP id c2-v6mr6430133qkm.18.1528488731807; Fri, 08 Jun 2018 13:12:11 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 8 Jun 2018 17:11:55 -0300 Message-Id: <20180608201155.30235-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 08 Jun 2018 20:12:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 08 Jun 2018 20:12:13 +0000 (UTC) for IP:'209.85.220.196' DOMAIN:'mail-qk0-f196.google.com' HELO:'mail-qk0-f196.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.220.196 mail-qk0-f196.google.com 209.85.220.196 mail-qk0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Fixing uninitialised variable inside virQEMUDriverConfigLoadFile. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 08 Jun 2018 20:14:11 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since virConfGetValueBool() can return earlier, the parameter 'value' might be not initialised properly inside this method. Another proof: Valgrind is returning this error during the libvirtd daemon startup: =3D=3D16199=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D16199=3D=3D at 0x27FFFEF4: virQEMUDriverConfigLoadFile (qemu_conf.= c:809) =3D=3D16199=3D=3D by 0x2807665C: qemuStateInitialize (qemu_driver.c:654) =3D=3D16199=3D=3D by 0x5535428: virStateInitialize (libvirt.c:662) =3D=3D16199=3D=3D by 0x12AED8: daemonRunStateInit (remote_daemon.c:802) =3D=3D16199=3D=3D by 0x536DE18: virThreadHelper (virthread.c:206) =3D=3D16199=3D=3D by 0x6CB36DA: start_thread (pthread_create.c:463) =3D=3D16199=3D=3D by 0x6FEC88E: clone (clone.S:95) Signed-off-by: Julio Faracco --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index f079ae3221..95f81703fd 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -511,7 +511,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr = cfg, char **nvram =3D NULL; char *corestr =3D NULL; char **namespaces =3D NULL; - bool tmp; + bool tmp =3D false; =20 /* Just check the file is readable before opening it, otherwise * libvirt emits an error. --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list