From nobody Sun Feb 8 21:06:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1608117664; cv=none; d=zohomail.com; s=zohoarc; b=nnvPJ8l53u6dVKRGD0mmIpBo9RhfVlu+E/4t6lYs5qJZjOn0kW2k4TARljsDxuMrgOYcaFwNqvXZ3meUicmEl3M0xJXP8Wo1spMLko9D/SrbMybAz1+tsdQd/xF6a4Wa8Tx8suEJH3W4SsakOZLmP2eLp5WTcCZCT1eUJuuRAk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608117664; 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=fpxsjlwiRbWdZZzXB79elRn8DbYgTJTW6E/vku4AQhI=; b=HpNVAuHmPpNR0SMSQFtKOHRoLp9YYdXf6UMJZ4uqei0xeo2ITEBEX982FNtt6mW+L/7NhyplxPF4wHdZXSECA5Sh9ffLdrKGsGMIF0Z+qI8/rgppQAbnvESVfjh+4lPrOgnXfy4io41cCzMF7t37VRwyD0r340Jl4hm1VRNabY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1608117664544244.5657944750143; Wed, 16 Dec 2020 03:21:04 -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-14-IVrRZ_RCOpmpL7v1r86owg-1; Wed, 16 Dec 2020 06:19:45 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFC2E803621; Wed, 16 Dec 2020 11:19:39 +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 AEC8F10013C1; Wed, 16 Dec 2020 11:19:38 +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 5F0AA180954D; Wed, 16 Dec 2020 11:19:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BGBJYpm025209 for ; Wed, 16 Dec 2020 06:19:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3B83D72167; Wed, 16 Dec 2020 11:19:34 +0000 (UTC) Received: from carol.localdomain (ovpn-117-30.ams2.redhat.com [10.36.117.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CF8E72168 for ; Wed, 16 Dec 2020 11:19:30 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id E9B2EC212D0 for ; Wed, 16 Dec 2020 12:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608117663; 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=fpxsjlwiRbWdZZzXB79elRn8DbYgTJTW6E/vku4AQhI=; b=WJEPjRrq9Jqbwks4zyTKyfASDwNxUYFKEdNe1Ds1HFxCiJ0TuTUd23snwDVWYaKr1NU+LW CZB+HTfKCH6wHbtgv5lrzMki5nr5HwrdpO7QWDPEgSMIk0HAFfm+04lMH5V1J7v+xxDoXn 9/mQuS5MNIJbzqKrjdblm9qZ0mFkmXE= X-MC-Unique: IVrRZ_RCOpmpL7v1r86owg-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] qemu: Fix possible segfault when migrating disks Date: Wed, 16 Dec 2020 12:19:26 +0100 Message-Id: <5db1fc56022642e610c911efd28f3a931279e917.1608117564.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" Users can provide URI without a schema. https://bugzilla.redhat.com/show_bug.cgi?id=3D1638889 Signed-off-by: Martin Kletzander --- src/qemu/qemu_migration.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index fcb33d0364a1..90b0ec95e35a 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -408,6 +408,11 @@ qemuMigrationDstStartNBDServer(virQEMUDriverPtr driver, if (!uri) return -1; =20 + if (!uri->scheme) { + virReportError(VIR_ERR_INVALID_ARG, _("No URI scheme specified= : %s"), nbdURI); + return -1; + } + if (STREQ(uri->scheme, "tcp")) { server.transport =3D VIR_STORAGE_NET_HOST_TRANS_TCP; if (!uri->server || STREQ(uri->server, "")) { --=20 2.29.2