From nobody Mon Feb 9 07:55:56 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=1614696607; cv=none; d=zohomail.com; s=zohoarc; b=htyRlQxd0lTks8+qZUsp0nzbSEOP25QbPqnpusEj8KrUKIL+Y67+c3kACXfWtdGu1O9tqs/kVT+6TQSyiHRqCb7vSGYT0DwK8aZkKqBOp7e16zAbB+GIRUOJTcOfBVqybg/dobDQzJkuSmkRlOvAgGoCg7bi3tinOvvFOUyGftw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614696607; 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=hclxgyPDhp2X6FrRFeFcGfEBVxTefIdRRtWv9VVsovM=; b=moCcjW72VeRs0B1ABn82PW54tNsIFZtNv5H8fuR31ek1koPB4KErjPSSRRzyKAEZIGPxuuMDxtneV6TfnoezNzecR7SYmjPBH9szBVmv5rtz9yDE4zkUbv2vPGhOC3jlYkCtYGze8MK5zBvVfxBeu0zr2riSgfBbvnRKPK2hiuY= 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) header.from= 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 1614696607620982.062849215813; Tue, 2 Mar 2021 06:50:07 -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-36-bUL6hJJXOqKfH3cPJA9QKA-1; Tue, 02 Mar 2021 09:50:04 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4331718B9ECA; Tue, 2 Mar 2021 14:49:58 +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 1DEB95C6AB; Tue, 2 Mar 2021 14:49:58 +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 D56F11809C8F; Tue, 2 Mar 2021 14:49:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 122EngFf014431 for ; Tue, 2 Mar 2021 09:49:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8473D5D723; Tue, 2 Mar 2021 14:49:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAAD55D722 for ; Tue, 2 Mar 2021 14:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614696606; 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=hclxgyPDhp2X6FrRFeFcGfEBVxTefIdRRtWv9VVsovM=; b=c1wDImKapoBkkZtfYTFqk9ACju+uUoZv3A4WRKyuuFSleVY5M2GSATNaDgxHzZ9ZXoCEFi cOhsxu+zTPvyqVkHF9rlbTs2Ci1NnZSnm5j6goY74+v9TJckEfq9kjGqARA3qqADZAqLCn mim2pE3fADol/bIyHyd+s8vF3Ve8CFE= X-MC-Unique: bUL6hJJXOqKfH3cPJA9QKA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/16] virDevMapperGetTargetsImpl: Use virStrcpy instead of virStrncpy Date: Tue, 2 Mar 2021 15:49:21 +0100 Message-Id: <0fefcaa1662185402170904206dafce0150bf0c6.1614696480.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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" virStrncpy was called with -1 for lenght of the copied source which is equivalent to virStrcpy. Signed-off-by: Peter Krempa --- src/util/virdevmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c index d97334bf67..fcb11e954f 100644 --- a/src/util/virdevmapper.c +++ b/src/util/virdevmapper.c @@ -240,7 +240,7 @@ virDevMapperGetTargetsImpl(int controlFD, if (!(sanitizedPath =3D virDMSanitizepath(path))) return 0; - if (virStrncpy(dm.name, sanitizedPath, -1, DM_TABLE_DEPS) < 0) { + if (virStrcpy(dm.name, sanitizedPath, DM_TABLE_DEPS) < 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("Resolved device mapper name too long")); return -1; --=20 2.29.2