Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-10-01 Thread Ferruh Yigit
On 10/1/2020 3:14 PM, Kevin Laatz wrote: On 25/09/2020 13:43, Ferruh Yigit wrote: On 9/22/2020 6:20 PM, Kevin Laatz wrote: Add a check for the return value of the sscanf call in parse_internal_args(), returning an error if we don't get the expected result. Coverity issue: 362049 Fixes: 96cb19

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-10-01 Thread Kevin Laatz
On 25/09/2020 13:43, Ferruh Yigit wrote: On 9/22/2020 6:20 PM, Kevin Laatz wrote: Add a check for the return value of the sscanf call in parse_internal_args(), returning an error if we don't get the expected result. Coverity issue: 362049 Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD sp

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-25 Thread Ferruh Yigit
On 9/22/2020 6:20 PM, Kevin Laatz wrote: Add a check for the return value of the sscanf call in parse_internal_args(), returning an error if we don't get the expected result. Coverity issue: 362049 Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API") Cc: sta...@dpdk.org Signed-off

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-23 Thread Bruce Richardson
On Wed, Sep 23, 2020 at 11:43:31AM +0200, David Marchand wrote: > On Wed, Sep 23, 2020 at 11:39 AM Bruce Richardson > wrote: > > I think a more standard way of checking for trailing chars is to use %n > > which stores the number of chars processed. Then check that against > > strlen. > > > > For e

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-23 Thread Kevin Laatz
On 23/09/2020 10:43, David Marchand wrote: On Wed, Sep 23, 2020 at 11:39 AM Bruce Richardson wrote: I think a more standard way of checking for trailing chars is to use %n which stores the number of chars processed. Then check that against strlen. For example something like: if (sscanf(value,

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-23 Thread David Marchand
On Wed, Sep 23, 2020 at 11:39 AM Bruce Richardson wrote: > I think a more standard way of checking for trailing chars is to use %n > which stores the number of chars processed. Then check that against > strlen. > > For example something like: > > if (sscanf(value, "%p%n", args, n) != 1 || n != str

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-23 Thread Bruce Richardson
On Wed, Sep 23, 2020 at 10:06:25AM +0200, David Marchand wrote: > On Tue, Sep 22, 2020 at 7:25 PM Kevin Laatz wrote: > > > > Add a check for the return value of the sscanf call in > > parse_internal_args(), returning an error if we don't get the expected > > result. > > > > Coverity issue: 362049

Re: [dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-23 Thread David Marchand
On Tue, Sep 22, 2020 at 7:25 PM Kevin Laatz wrote: > > Add a check for the return value of the sscanf call in > parse_internal_args(), returning an error if we don't get the expected > result. > > Coverity issue: 362049 > Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API") > Cc: sta

[dpdk-dev] [PATCH] net/ring: fix unchecked return value

2020-09-22 Thread Kevin Laatz
Add a check for the return value of the sscanf call in parse_internal_args(), returning an error if we don't get the expected result. Coverity issue: 362049 Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API") Cc: sta...@dpdk.org Signed-off-by: Kevin Laatz --- drivers/net/ring/rte