From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v3] cmdline: fix dynamic tokens parsing Date: Thu, 25 Jan 2018 23:14:54 +0100 Message-ID: <6036415.8kRf9vpIdb@xps> References: <20171115155402.9967-1-xuemingl@mellanox.com> <20180119181610.107332-1-xuemingl@mellanox.com> <20180122131335.tivzooo4zxhlucwa@platinum> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: stable@dpdk.org, Olivier Matz , dev@dpdk.org, Adrien Mazarguil To: Xueming Li Return-path: In-Reply-To: <20180122131335.tivzooo4zxhlucwa@platinum> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 22/01/2018 14:13, Olivier Matz: > 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 Applied, thanks