From nobody Mon Sep 8 17:03:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1756277628; cv=none; d=zohomail.com; s=zohoarc; b=TfS9DExerTo7rqzEvdkJaK695Yp4XskjLc8v76GROzMY/LPDmKzrL0dIs+1H5a0OHLWeKp9HpxKbJYlx7XCx3ABcwc9Krb+3GP8rynKW2atDG6HWAPoAF4NfxHeeJ6jRfdK3YUrEgNlBtKx4j20xptwJEuFaOIxI64spYICVW/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756277628; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=eZCiHWv+Q5UyatSFerQbBQyU89nc66Sf4CoJPcZ+vBM=; b=jq1sll7BhiqQVDEY45tLKpfLJI980a32B/J0iQW8hySbNkNO0gmF/eJPX/9/FQoEprN7nn00oP1uWbB18yC9Dq+h3QAT7ppC1ZuM2BWjwhX2tJ8xMIMbiFsrjqL+JWddBXL1aek09Q//Igqgl8mHoHNnkwtExvdSGgP4nzcIZ4w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1756277628314694.8991215184136; Tue, 26 Aug 2025 23:53:48 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 78BEC43F64; Wed, 27 Aug 2025 02:53:47 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 16354440AE; Wed, 27 Aug 2025 02:50:35 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2D1AF43F40; Wed, 27 Aug 2025 02:50:15 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6D42D43F3A for ; Wed, 27 Aug 2025 02:50:14 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-roR_yRaVP9anZrfXBzLuUA-1; Wed, 27 Aug 2025 02:50:11 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6CE421800561 for ; Wed, 27 Aug 2025 06:50:10 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A7EDD1800290 for ; Wed, 27 Aug 2025 06:50:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756277413; h=from:from: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; bh=eZCiHWv+Q5UyatSFerQbBQyU89nc66Sf4CoJPcZ+vBM=; b=XuuVUUYFKrOdAfQpnQsJtWyga3Fu/ZHx7SmVUA/zTjmqBXFwe9INbzL2NETM1VEzh3Gc/A 2TfrlqPksyvm9DXTXtElN+AykeuNO0A8VSPyulFCSnNA2iME0FClzNb5YmwfVAYI9HezDu ex/PmI2Dks8LGg9N9vjQSE/pOYrPhjU= X-MC-Unique: roR_yRaVP9anZrfXBzLuUA-1 X-Mimecast-MFC-AGG-ID: roR_yRaVP9anZrfXBzLuUA_1756277410 To: devel@lists.libvirt.org Subject: [PATCH 1/2] datatypes: virGetStream: Add missing 'virCheckConnectReturn' check Date: Wed, 27 Aug 2025 08:50:05 +0200 Message-ID: <96fd57f33ea8677f1ef8fdcdd0be9c53894deb1f.1756277371.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: x7falWfjQgPCgUHZWO6ck7CoCDjWE3Yda7639F5-5ZY_1756277410 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LQLPKY23QART3B6W6UIBDYVWJXE6N6FK X-Message-ID-Hash: LQLPKY23QART3B6W6UIBDYVWJXE6N6FK X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1756277629919116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'virGet*' helpers check that the passed objects which are used to construct the new object are valid. The check that the 'conn' object in 'virStreamGet' was missing. Signed-off-by: Peter Krempa --- src/datatypes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/datatypes.c b/src/datatypes.c index c83a74edd5..4e72855ebc 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -798,6 +798,8 @@ virGetStream(virConnectPtr conn) if (virDataTypesInitialize() < 0) return NULL; + virCheckConnectReturn(conn, NULL); + if (!(ret =3D virObjectNew(virStreamClass))) return NULL; --=20 2.51.0