From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 93111A00C3;
	Thu, 14 May 2020 10:52:15 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id C84271D6D1;
	Thu, 14 May 2020 10:52:14 +0200 (CEST)
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 7985E1D17D;
 Thu, 14 May 2020 10:52:13 +0200 (CEST)
IronPort-SDR: dTf4QS5X/RC3turalO/NubJe/Z0UPXRSG5C78FqxEkEX+W4+c0WE8j6AIoGv6j4tG1ICx0Umgd
 83RpyZpay01A==
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 14 May 2020 01:52:11 -0700
IronPort-SDR: /ScG1lUgbOvqiK3/sJ9CNb00XyZZ338DPGpTTSW1M6XPr80yD0lnpC7b6wWGTrwSoVOWNq/+zZ
 1SU64X8tQw3A==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.73,390,1583222400"; d="scan'208";a="297961872"
Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203])
 by fmsmga002.fm.intel.com with ESMTP; 14 May 2020 01:52:11 -0700
Received: from lcsmsx602.ger.corp.intel.com (10.109.210.11) by
 FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)
 id 14.3.439.0; Thu, 14 May 2020 01:52:11 -0700
Received: from hasmsx603.ger.corp.intel.com (10.184.107.143) by
 LCSMSX602.ger.corp.intel.com (10.109.210.11) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.1713.5; Thu, 14 May 2020 11:52:09 +0300
Received: from hasmsx603.ger.corp.intel.com ([10.184.107.143]) by
 HASMSX603.ger.corp.intel.com ([10.184.107.143]) with mapi id 15.01.1713.004;
 Thu, 14 May 2020 11:52:08 +0300
From: "Stojaczyk, Dariusz" <dariusz.stojaczyk@intel.com>
To: Gaetan Rivet <grive@u256.net>, "dev@dpdk.org" <dev@dpdk.org>
CC: "stable@dpdk.org" <stable@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v1 1/2] pci: fix allowing underflow when
 parsing	PCI id
Thread-Index: AQHWKRQLUxLsS4sLXUelCDM4NqL+sKinRwwg
Date: Thu, 14 May 2020 08:52:08 +0000
Message-ID: <48194793f9a94f26b4a790527779d004@intel.com>
References: <20200513104751.46466-1-grive@u256.net>
 <20200513104751.46466-2-grive@u256.net>
In-Reply-To: <20200513104751.46466-2-grive@u256.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-version: 11.2.0.6
dlp-product: dlpe-windows
dlp-reaction: no-action
x-originating-ip: [163.33.253.164]
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v1 1/2] pci: fix allowing underflow when
 parsing	PCI id
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Gaetan Rivet
> Sent: Wednesday, May 13, 2020 12:48 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 1/2] pci: fix allowing underflow when parsi=
ng PCI
> id
>=20
> The function strtoul will not return ERANGE if the input is negative, as
> one might expect.
>=20
>    0000:-FFFFFFFFFFFFFFFB:00.0
>=20
> is not a better way to write 0000:05:00.0.
> To simplify checking for '-', forbid using spaces before the field value.
>=20
>    0000: 00:   2c.0
>=20
> Should not be accepted.
>=20
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
> Signed-off-by: Gaetan Rivet <grive@u256.net>
> ---

Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>