From nobody Mon Feb 9 10:27:28 2026 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571434850; cv=none; d=zoho.com; s=zohoarc; b=ax6Z1tyM7oK2Si7lVLEDh6y2+guPVmnKGnkfuwBIIQQZQ79j33qaxL+dWf8LFLPaJHUW4lsqmF/vTnaz1osDIPGhT/xRltmfSE+jRBcL/IZYpjKeL119saTABi2Qmbh2WPvwDZewndUNt1bwkdsRt6JFwyS/bBzdc5frSUMy+R4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571434850; h=Content-Type:Content-Transfer-Encoding:Cc: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=Ma8ontVVn0H9C1kYgSNiZEmtZPCGo8sEuevlRax+v3s=; b=MRdW22d7N6z6gXv/1V9HwN1qlwBNbPa1g7Yw5fGuNlAdhntSY5KmJE4ZaNeGSgnpZHyAXd0XjtGC7ztF3UabQoMO/TIg38lxiji8ZcFyPoNBXYzosTi5i6ocSUf9b9ShSehfFDXGsm4uJV1iSum43XZmhfcXxDfFLSvR3aNaQks= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571434850068934.0452947135088; Fri, 18 Oct 2019 14:40:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45B8030860D7; Fri, 18 Oct 2019 21:40:48 +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 21CDD5DA8C; Fri, 18 Oct 2019 21:40:48 +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 D3F334EEBA; Fri, 18 Oct 2019 21:40:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9ILeVgr022440 for ; Fri, 18 Oct 2019 17:40:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id DA2725C226; Fri, 18 Oct 2019 21:40:31 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-117-200.phx2.redhat.com [10.3.117.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91B065C1B5; Fri, 18 Oct 2019 21:40:31 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 18 Oct 2019 16:40:22 -0500 Message-Id: <20191018214023.25481-5-jjongsma@redhat.com> In-Reply-To: <20191018214023.25481-1-jjongsma@redhat.com> References: <20191018214023.25481-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: jcfaracco@gmail.com, crobinso@redhat.com Subject: [libvirt] [PATCH 4/5] conf: ensure both resolution values are non-zero 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 18 Oct 2019 21:40:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Since the users of the resolution expect the x and y values to be non-zero, enforce it in the parser and report an error if either is zero. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a446ce4d62..38f8b37b69 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15382,6 +15382,12 @@ virDomainVideoResolutionDefParseXML(xmlNodePtr nod= e) return NULL; } =20 + if (def->x =3D=3D 0 || def->y =3D=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("resolution values must be greater than 0")); + return NULL; + } + return g_steal_pointer(&def); } =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list