From nobody Sun Feb 8 18:44:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632315767; cv=none; d=zohomail.com; s=zohoarc; b=Ns7aId3YENHFDhfxtAaapprFHpx2jYm2Tpd0f0be0lE4eK/5cRQnW2AKyxnqKFrCCWJhc7N5IvZybv3C/PrBL+s21t21X3MbEJeDFsAakapF394f0p0/jMmGNHxJEnuT9vrYbnZ1X6zSaJDBZMIQwVD5C3r9I8FBWPpODX9yx20= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632315767; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=80glcFlPcp08CPJqTr+qXGl5FDQHxA/GhQGNbnqZaBQ=; b=SemdGLydBGOi4zhLCln15mhgnn3wwiI7OJQilJVHApF1h3U6fpcseRqwOmSrZ2oem3euKEmdewTp7JAj+TMPXARMGe1dgJY2R45yND9WPl905/zBak4Xnh8l4aeYjgAWUABOAopS8S0QN6p251+imkrubvUL53N2TReowuE7wdI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1632315767472825.7913467721055; Wed, 22 Sep 2021 06:02:47 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-JJwkg4psOJqhNqwA--bsRA-1; Wed, 22 Sep 2021 09:02:44 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5C5F1922962; Wed, 22 Sep 2021 13:02:37 +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 A829F18B5E; Wed, 22 Sep 2021 13:02:37 +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 A73C64EA29; Wed, 22 Sep 2021 13:02:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18MD2XWY020280 for ; Wed, 22 Sep 2021 09:02:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 318245D9DC; Wed, 22 Sep 2021 13:02:33 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 846E45D9CA for ; Wed, 22 Sep 2021 13:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632315765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=80glcFlPcp08CPJqTr+qXGl5FDQHxA/GhQGNbnqZaBQ=; b=QVHBoCWst9xOvxdXSYcxPO7G0UJvhmK18Zw3Se+VhCQaaLHFoRdXmFCh82NssLZCGmUfON jEgKT3D4r4ulRTlGrHuw0BCj9XZeVGPEZAcE1lfGLyanGC9Z4Yxgs8fz7Hn/iXCijmt7X7 CMgJ90eim84h9noPrXLW2umHhtYh8pM= X-MC-Unique: JJwkg4psOJqhNqwA--bsRA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/20] testCompareXMLToArgv: Avoid use of uninitialized 'monitor_chr' Date: Wed, 22 Sep 2021 15:02:10 +0200 Message-Id: <7bfd065ec326111a6c4fa17a1e79f94d72a4875a.1632315628.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632315782770100003 Content-Type: text/plain; charset="utf-8" Failure of 'testQemuInfoInitArgs' jumps over the initialization of 'monitor_chr' via memset, which leads to a crash. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f0cfca014c..675537b05d 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -642,14 +642,14 @@ testCompareXMLToArgv(const void *data) virArch arch =3D VIR_ARCH_NONE; g_autoptr(virIdentity) sysident =3D virIdentityGetSystem(); + memset(&monitor_chr, 0, sizeof(monitor_chr)); + if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0) goto cleanup; if (info->arch !=3D VIR_ARCH_NONE && info->arch !=3D VIR_ARCH_X86_64) qemuTestSetHostArch(&driver, info->arch); - memset(&monitor_chr, 0, sizeof(monitor_chr)); - if (!(conn =3D virGetConnect())) goto cleanup; --=20 2.31.1