From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82D2DA0471 for ; Tue, 16 Jul 2019 13:28:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 209383195; Tue, 16 Jul 2019 13:28:38 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 19CAB2C18; Tue, 16 Jul 2019 13:28:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 128234FA; Tue, 16 Jul 2019 07:28:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 16 Jul 2019 07:28:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Hq923FpJNXdFN4V4syVleeE5wmtltjHhemk9p/sTIxM=; b=bXdh7yjFzwrO q7OA5V/biA5G575jMNbfSWtU8Rw2MHTgo/abnHRqyZ+xcERBdMJHiRfT8ChU23lM nNgFXJF+x1kWejGjLIIROAesUm0GPLmxusoLAlty4QmjFRxUkcc7bJ0/PL1MTer1 UW2mQLHhbVBN2OiFYxltQsF3Nc9e+SA= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Hq923FpJNXdFN4V4syVleeE5wmtltjHhemk9p/sTI xM=; b=gMzHiXl/MgRjBSXmqX71tKg9V0B/9z6boTKg8LX99LkZ/rOCIaxcA5VAH FpSw+xzjFzqSRoxllfA+kqjFPpbSJ7DIR3ZKwnagIcBCZuh0/fJbQAn4aebC7Xsb 0eJMwnJV+nIWihAyUKHRPfT3kNAUGnVgSF5a9uzlp5Ro69vZgJtQLxYYPBxOt6br Scx0ED6nDVd12Dv/SetX1jfDGuf4s/An2hEO6xB/DStDnkVnuEClvZ5OCXKQpl3+ Z0UoiakNjEC7dmwkef3F12fNhw5cL14rC3YExEvwkT5f2OBrpdVX+LUqCBduEyNS 1V2W60m5ziXpUexMSOtw0MHHA7X6w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddriedtgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8ADC38005C; Tue, 16 Jul 2019 07:28:32 -0400 (EDT) From: Thomas Monjalon To: David Hunt Cc: dev@dpdk.org, stable@dpdk.org Date: Tue, 16 Jul 2019 13:28:31 +0200 Message-ID: <6012179.SWPVsCGEkT@xps> In-Reply-To: <20190716111900.33553-1-david.hunt@intel.com> References: <20190716082405.22394-1-david.hunt@intel.com> <20190716111900.33553-1-david.hunt@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] examples/vm_power: fix strcpy buffer overrun 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 16/07/2019 13:19, David Hunt: > replace strcpy with strlcpy to prevent buffer overrun > With fix, attempting to use a VERY lonng vm name results in a nicely > truncated 32 character name rather than a segfault: > Setting VM Name to [sdfdsfsfsdffdsdsasdsadasdakjshd] > > Using strlcpy rather than rte_strlcpy, as the rte_ version is only a > fallback. > > As well as the fix in main.c, this patch also changes an occurrence of > rte_strlcpy in channel_manager.c and channel_monitor.c to strlcpy. > > Fixes: 59287933a0bb ("examples/vm_power: add options to guest app") > Cc: stable@dpdk.org > Signed-off-by: David Hunt > Acked-by: Anatoly Burakov Applied, thanks