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 6EE9FA04DC; Tue, 20 Oct 2020 00:06:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4AC65AD5D; Tue, 20 Oct 2020 00:06:44 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 6EDBFACBA; Tue, 20 Oct 2020 00:06:42 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 113FD5C0217; Mon, 19 Oct 2020 18:06:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 19 Oct 2020 18:06:42 -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=fm2; bh= +tlzFrPZLcw/35AkFNUvgF2iT7E1J2c6EWIsSgAimKk=; b=IPa7pGVYD+RR6Lwh f1SGRhdHr8BOdg+fn7Jva4ygothtgd24AsHxyf0CIpP+rYHZmVUPv1jxyTyjqTKo +IUTyfy20h+WDbnX56Zhot5Z/zam6aAP+oLiudLrnNz9i4tSuPUlpjH83iSG2WOr a1THN7xehoN8zVdmGc/tvPhgCxhKIA7XPfuj/V46D7RyKch/HlDaF86WoF/B+M7I iALn300ftQ9EoI84FIW/PIcPzpNBsPi50YTx4VHofxucGXNY6TWJVvhRJmXmKSzj bvKCI7EXNXMGa+p144laPfpLBR1l73Q4MO7Iyi9Oilimx+4a79rZxEEpGwX3pUTJ bR3CAQ== 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=fm1; bh=+tlzFrPZLcw/35AkFNUvgF2iT7E1J2c6EWIsSgAim Kk=; b=grMt4aUtC3Jt3lOoEXOi3aPeuXZSTgbpvoSd9BEaHKWkaa6jp2FM6TVWo ZiUH0MIxtSKC3Wr2wlskBUFd2tFe30faqjBrVyHyx2eqfhO3jMJ4re3bXG9hgWuz yHJ/AE0nD2vZfG6J36ecI0xrLus5opQc9aWqHGSxvb8aDayXUtXqshmv7we5QKwN VHp7eYeaPMBYsDOXUReqzvVp3IaXc2T46IgtTpjfnIvwXd0XwPELSaE9aGYEC7wV OrxKJv8ixF+dNlLszh4gDtfq/GtbiZ+EIYcI/d90bkMNMI5aKDIUvbj8sIECQSCn heUoiu6IgB3ih5+Z+Rj2a574CzckQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrjedvgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 D2149306467D; Mon, 19 Oct 2020 18:06:40 -0400 (EDT) From: Thomas Monjalon To: Ophir Munk Cc: Ori Kam , "dev@dpdk.org" , Raslan Darawsheh , stable@dpdk.org, Lukasz Wojciechowski Date: Tue, 20 Oct 2020 00:06:39 +0200 Message-ID: <1925730.gUPrjPanqK@thomas> In-Reply-To: References: <20201018142147.11456-1-ophirmu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v1] app/regex: fix segfault in getopt_long call 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" > >> getopt_long() parses command-line arguments. One of its arguments > >> 'longopts' is a pointer to the first element of an array of struct > >> option. The last element of the array has to be filled with zeros > >> to mark the end of options. For example: > >> > >> struct option longopts[] = { > >> { "help", 0, 0, ARG_HELP}, > >> .... > >> /* End of options */ > >> { 0, 0, 0, 0 } > >> }; > >> > >> This commit adds the last element. Prior to this commit getopt_long() > >> continued parsing beyond the longopts[] array which occasionally caused > >> segmentation faults. > >> > >> Fixes: de06137cb295 ("app/regex: add RegEx test application") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Ophir Munk > > Acked-by: Ori Kam > Acked-by: Lukasz Wojciechowski Applied, thanks