From patchwork Wed Aug 31 12:06:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasad Pandit X-Patchwork-Id: 9307029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF54060756 for ; Wed, 31 Aug 2016 12:06:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F98228EF3 for ; Wed, 31 Aug 2016 12:06:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 912AE28EF6; Wed, 31 Aug 2016 12:06:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0545028EF3 for ; Wed, 31 Aug 2016 12:06:37 +0000 (UTC) Received: from localhost ([::1]:53933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf4Hr-0007P3-Ra for patchwork-qemu-devel@patchwork.kernel.org; Wed, 31 Aug 2016 08:06:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf4Ha-0007Oj-7L for qemu-devel@nongnu.org; Wed, 31 Aug 2016 08:06:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf4HV-0003X1-VL for qemu-devel@nongnu.org; Wed, 31 Aug 2016 08:06:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf4HV-0003Wk-Q8 for qemu-devel@nongnu.org; Wed, 31 Aug 2016 08:06:13 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE5DBC05678E; Wed, 31 Aug 2016 12:06:12 +0000 (UTC) Received: from javelin.localdomain (vpn1-5-246.ams2.redhat.com [10.36.5.246]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7VC68vI029864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 31 Aug 2016 08:06:11 -0400 From: P J P To: Qemu Developers Date: Wed, 31 Aug 2016 17:36:06 +0530 Message-Id: <1472645167-30765-1-git-send-email-ppandit@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 31 Aug 2016 12:06:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] scsi: mptconfig: fix format string X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Prasad J Pandit Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Prasad J Pandit When LSI SAS1068 Host Bus emulator builds configuration page headers, the format string used in 'mptsas_config_manufacturing_1' was wrong. It could lead to an invalid memory access. Reported-by: Tom Victor Fix-suggested-by: Paolo Bonzini Signed-off-by: Prasad J Pandit --- hw/scsi/mptconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/mptconfig.c b/hw/scsi/mptconfig.c index 7071854..1ec895b 100644 --- a/hw/scsi/mptconfig.c +++ b/hw/scsi/mptconfig.c @@ -203,7 +203,7 @@ size_t mptsas_config_manufacturing_1(MPTSASState *s, uint8_t **data, int address { /* VPD - all zeros */ return MPTSAS_CONFIG_PACK(1, MPI_CONFIG_PAGETYPE_MANUFACTURING, 0x00, - "s256"); + "*s256"); } static