From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.34875.1653902583454148264 for ; Mon, 30 May 2022 02:23:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gnni0l8P; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653902582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=visj33Gr8MpiCkD3sZ8TNdigwmCUdHHhWZ9CvR9GqaE=; b=gnni0l8PwKUiB3zL5JqdH8JtQSARDWXyL55Zu39fetyb+79k5BDJo32mw7xMBMfbP7Bh33 8Le7fcyTJP7Mug5LouWPftDOaOyQ672d4AmJcGXF9NNCm7pep4ww03XKVxVtNEznrn59aQ fuOBHBZF95Ey0kDbmKFu99srKuw69j0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-15-iMoRLnTfP_yk_hr4VLyE4A-1; Mon, 30 May 2022 05:22:58 -0400 X-MC-Unique: iMoRLnTfP_yk_hr4VLyE4A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 321AA185A7A4; Mon, 30 May 2022 09:22:58 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 180F8414A7E7; Mon, 30 May 2022 09:22:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 933DE180039F; Mon, 30 May 2022 11:22:55 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Oliver Steffen , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Pawel Polawski , Rebecca Cran Subject: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call Date: Mon, 30 May 2022 11:22:55 +0200 Message-Id: <20220530092255.279983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`. Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode") Reported-by: Rebecca Cran Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtioGpuDxe/Gop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index 70a81c10c8b5..18b29e5a23d2 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -509,7 +509,7 @@ GopSetMode ( // Populate Mode and ModeInfo (mutable fields only). // VgpuGop->GopMode.Mode = ModeNumber; - VgpuGop->GopModeInfo = *GopModeInfo; + CopyMem(&VgpuGop->GopModeInfo, GopModeInfo, sizeof(*GopModeInfo)); FreePool (GopModeInfo); return EFI_SUCCESS; -- 2.35.3