From patchwork Wed Apr 27 11:11:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8955031 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FE9CBF29F for ; Wed, 27 Apr 2016 11:14:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67013201E4 for ; Wed, 27 Apr 2016 11:14:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9A83200F0 for ; Wed, 27 Apr 2016 11:14:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNOE-0003JG-KN; Wed, 27 Apr 2016 11:12:18 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNOD-0003H2-HC for xen-devel@lists.xenproject.org; Wed, 27 Apr 2016 11:12:17 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 48/6C-07120-19E90275; Wed, 27 Apr 2016 11:12:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRWlGSWpSXmKPExsXitHRDpO7EeQr hBhs0LL5vmczkwOhx+MMVlgDGKNbMvKT8igTWjPcH6wuuslcs2fabpYGxja2LkZNDQsBf4v/e j+wgNpuAjsTFuTuB4hwcIgIqErf3GoCEmQWKJb6u6mMFsYUFfCQ+tE1nArFZBFQlXr47zghi8 wq4SNw8d5EZYqSuxMndm8BGcgq4SrQ1TWABsYWAap7evsMKUS8ocXLmExaI+ZoSrdt/s0PY8h LNW2czQ9QrSvTPewB2joQAt8TfbvsJjPyzkHTPQtI9C0n3AkbmVYzqxalFZalFuoZ6SUWZ6Rk luYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiBoccABDsYdz53OsQoycGkJMq7sF0hXIgvKT+l MiOxOCO+qDQntfgQowwHh5IEb/hcoJxgUWp6akVaZg4wCmDSEhw8SiK89XOA0rzFBYm5xZnpE KlTjLocC37cXsskxJKXn5cqJc6bCDJDAKQoozQPbgQsIi8xykoJ8zICHSXEU5BalJtZgir/il Gcg1FJmPcAyBSezLwSuE2vgI5gAjri8iFZkCNKEhFSUg2MCg4Butpbv505c5mNK83kisHHH88 iAyewKOx1iHtmVhn9Qinmic29DZz5f51s7OdvfKrDlyQiGqfss6HiKHv8cxuJ674VfCteb49c f/Sod7Kg5odGx/rHSySjPqyetN3iptRrCdtTBxbHbpxioJQY5XpPR/mn21235Z8vTgqtkviuu Ely5bdaJZbijERDLeai4kQAqVznpMMCAAA= X-Env-Sender: prvs=918322aae=roger.pau@citrix.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1461755531!11621047!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30189 invoked from network); 27 Apr 2016 11:12:16 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 27 Apr 2016 11:12:16 -0000 X-IronPort-AV: E=Sophos;i="5.24,541,1454976000"; d="scan'208";a="350092164" From: Roger Pau Monne To: Date: Wed, 27 Apr 2016 13:11:45 +0200 Message-ID: <1461755514-23754-8-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461755514-23754-1-git-send-email-roger.pau@citrix.com> References: <1461755514-23754-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v3 for-4.7 07/16] libxc: fix usage of uninitialized variable X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP *size should be used instead, because it contains the size of the buffer in out_buf. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - Use *size instead of 0, because it will contain the actual size of the out_buf buffer. --- tools/libxc/xc_dom_bzimageloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_bzimageloader.c b/tools/libxc/xc_dom_bzimageloader.c index 7fde42a..33ba06b 100644 --- a/tools/libxc/xc_dom_bzimageloader.c +++ b/tools/libxc/xc_dom_bzimageloader.c @@ -482,7 +482,7 @@ static int xc_try_lzo1x_decode( if ( !dst_len ) { msg = "Error registering stream output"; - if ( xc_dom_register_external(dom, out_buf, out_len) ) + if ( xc_dom_register_external(dom, out_buf, *size) ) break; return 0;