From nobody Sat Feb 7 08:28:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1572789240; cv=none; d=zoho.com; s=zohoarc; b=K2pXb5g6e/WZjWTAY3yRhNf2WT+QZocqBlnF0FWbCpREy6ttiXJaTKBnD9191JvdOcerkiNxDL0TOb2w6754Xr9c4HcMGrQzK+jtekdbcks94Po+e9CdzL8nSCwpO8lA1+SKfIgOHXIlzq2fll0rCvEtJc3SPLrq2BrRe8oT+GA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572789240; 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=l7Ee33hWNiOxSm495QNwtwnQEFtVf4btfeR4iZ8ggv8=; b=UVNLaxng3yUCZK3am6GcGMkeShFVEERSe1Ne68wSsB8fLjsawy/wkbLgU7RMx8YlreYJxR6XlveNdGQqQ9tOyyKvAk9z1UZayhgjRMuQCGeegqe9H5b9tbVbVUJmql/+0ZrOyTTtDdFE850L+1DYH6s+2Mv3E54ylehCCKMaQWc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1572789240927603.2049266408931; Sun, 3 Nov 2019 05:54:00 -0800 (PST) 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-247-shrx9DRoNQKC-dNCoCobLQ-1; Sun, 03 Nov 2019 08:53:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0E62801FCB; Sun, 3 Nov 2019 13:53:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DA086085E; Sun, 3 Nov 2019 13:53:51 +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 A5CBE182B010; Sun, 3 Nov 2019 13:53:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA3DripF005784 for ; Sun, 3 Nov 2019 08:53:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2F5386085E; Sun, 3 Nov 2019 13:53:44 +0000 (UTC) Received: from unknown04D3B0C4CC7D.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id E582560874 for ; Sun, 3 Nov 2019 13:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572789239; 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=l7Ee33hWNiOxSm495QNwtwnQEFtVf4btfeR4iZ8ggv8=; b=aOFu5I5LYL32y/utm/8ehQrXa4ORmpxgP7Y9JrfCBkuc3YBxyk1Em1sU2wq2nVjxp5dhAb LytnA/w0GQ7bxnUyl0Qkg1eVJkunZneiGMGPQJuLWEClO+x3n/th+PZ0JsaUPtcTj64orX klQXAQxKqdDk690YgRxy+uvXiYiVN18= From: John Ferlan To: libvir-list@redhat.com Date: Sun, 3 Nov 2019 08:53:33 -0500 Message-Id: <20191103135340.3505-2-jferlan@redhat.com> In-Reply-To: <20191103135340.3505-1-jferlan@redhat.com> References: <20191103135340.3505-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/8] vbox: Fix possible NULL deref 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.13 X-MC-Unique: shrx9DRoNQKC-dNCoCobLQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The @valueTypeUtf8 references need to use the STREQ_NULLABLE since they're variantly filled in by @valueTypeUtf16. Found by Coverity. Signed-off-by: John Ferlan --- src/vbox/vbox_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 5486e5ff3b..cdbec15dae 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3509,13 +3509,13 @@ vboxDumpDisplay(virDomainDefPtr def, vboxDriverPtr = data, IMachine *machine) VBOX_UTF8_FREE(valueDisplayUtf8); } =20 - if (STREQ(valueTypeUtf8, "sdl")) { + if (STREQ_NULLABLE(valueTypeUtf8, "sdl")) { graphics->type =3D VIR_DOMAIN_GRAPHICS_TYPE_SDL; graphics->data.sdl.display =3D valueDisplayUtf8; valueDisplayUtf8 =3D NULL; } =20 - if (STREQ(valueTypeUtf8, "gui")) { + if (STREQ_NULLABLE(valueTypeUtf8, "gui")) { graphics->type =3D VIR_DOMAIN_GRAPHICS_TYPE_DESKTOP; graphics->data.desktop.display =3D valueDisplayUtf8; valueDisplayUtf8 =3D NULL; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list