From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 0AFFF235 for ; Fri, 4 Aug 2017 18:12:04 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 98F7120C5C; Fri, 4 Aug 2017 12:12:03 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 04 Aug 2017 12:12:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=dTWssAwqWB6ISWZ TEZp6z8lcrLNZs4ChJQMXKX0wWzc=; b=UZDrFPURCfj+vLejc8SnqTyrT3PRfRA fLPn/o2C8raYeFiFOk9sblov7LP6WjrLfdK4FM6pcG9h+3h2fBMBNlAaDX3HpFFo 1ZqALvN9Q22e2RXWsBiY1HmUfJ/bJ2l1EWntrTuBkWIJ88FQu0trglmqFzL41Cl1 EdOf2r+mV/Ps= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=dTWssAwqWB6ISWZTEZp6z8lcrLNZs4ChJQMXKX0wWzc=; b=AY6TDcV4 AwNYSfU8yWeLRc9HNXvWd8el7PxFypmPpK9sJMttSJWP6pN3hwSFDMIemO4M1EkP PvaQ/mNtH47PLZJ3rRFTMuvkWtdvavDRKhxqehc/HQVTCfM3RhO3syHIPH5g2HvL 5seDkVkpQOb1C2iPzDeUQsIzBHtKiMx4JARz2/hjUaEl2e3GKxpaPLWow5o7kF6t ji41f7k6N6S/5Vkws0omzFltTozaMtoOLZ/S0Mt1dX7AUusH8RBLIk9nBqu76GIi ZadQtSEW6w07tfFfkQ0IEh5QtrjjffeLD8fUPSRErU8KkB1Bwh6/HzisvBVUujTD 8EJukSZeFBJZqQ== X-ME-Sender: X-Sasl-enc: PKYCpWmAulsKSIokBB1H3QwJ95LQH0I8nGq2uGJoKS1h 1501863123 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C11E7E6AD; Fri, 4 Aug 2017 12:12:03 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org Date: Fri, 04 Aug 2017 18:12:02 +0200 Message-ID: <5052998.tBGEROTkJq@xps> In-Reply-To: <1501860623-16747-1-git-send-email-gaetan.rivet@6wind.com> References: <1501860623-16747-1-git-send-email-gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: fix off-by-one error in hotplug add 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: Fri, 04 Aug 2017 16:12:04 -0000 04/08/2017 17:30, Gaetan Rivet: > snprintf returns the length it would have written had the given length > been enough, *terminating null byte excluded*. > > It will however limit the length of its writing to given length minus > one, and always put a terminating null-byte at the end of the string. > > This must be taken into account when calculating the total length of the > device declaration string. > > Fixes: 3054036f054a ("eal: fix possible crash in hotplug") > > Signed-off-by: Gaetan Rivet > --- > > Charybdis -> Scylla Oiseau de mauvais augure :) The best is the enemy of the good. Applied, thanks