From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 5B1D0199B5; Mon, 22 Jan 2018 14:13:39 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1edbux-0006dA-3u; Mon, 22 Jan 2018 14:13:44 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 22 Jan 2018 14:13:35 +0100 Date: Mon, 22 Jan 2018 14:13:35 +0100 From: Olivier Matz To: Xueming Li Cc: dev@dpdk.org, Adrien Mazarguil , stable@dpdk.org Message-ID: <20180122131335.tivzooo4zxhlucwa@platinum> References: <20171115155402.9967-1-xuemingl@mellanox.com> <20180119181610.107332-1-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180119181610.107332-1-xuemingl@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3] cmdline: fix dynamic tokens parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 13:13:39 -0000 On Sat, Jan 20, 2018 at 02:16:10AM +0800, Xueming Li wrote: > When using dynamic tokens, the result buffer contains pointers to some > location inside the result buffer. When the content of the temporary > buffer is copied in the final one, these pointers still point to the > temporary buffer. > > This works until the temporary buffer is kept intact, but the next > commit introduces a memset() that breaks this assumption. > > This commit keeps the successfully parsed buffers, and ensures that the > pointers point to the valid location, by using temp buffer for following > parsing. > > Fixes: 9b3fbb051d2e ("cmdline: fix parsing") > Cc: stable@dpdk.org > Signed-off-by: Xueming Li Acked-by: Olivier Matz