[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-30 Thread Richardson, Bruce
> -Original Message- > From: Olivier MATZ [mailto:olivier.matz at 6wind.com] > Sent: Monday, June 30, 2014 12:42 AM > To: Richardson, Bruce; De Lara Guarch, Pablo; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] string: fix potential seg fault on snprintf > > Hello

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-30 Thread Olivier MATZ
Hello Bruce, On 06/27/2014 06:36 PM, Richardson, Bruce wrote: > Famous last words include "that could never happen!" :-) > Since this is not a performance critical piece of code, it does not hurt to > leave the Null-check in, and get the additional safety of checking for > invalid inputs. The "

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-27 Thread Richardson, Bruce
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Olivier MATZ > Sent: Friday, June 27, 2014 5:34 AM > To: De Lara Guarch, Pablo; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] string: fix potential seg fault on snprintf > > Hi Pablo,

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-27 Thread Olivier MATZ
Hi Pablo, On 06/27/2014 02:13 PM, De Lara Guarch, Pablo wrote: > With last Thomas' patch, cmdline unit test does not pass due to this problem > (basically it tests this situation). > After test passed, by fixing this issue in several functions, I looked for > other places where this happened. I

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-27 Thread Olivier MATZ
Hello Pablo, On 06/27/2014 01:04 PM, Pablo de Lara wrote: > From: Pablo de Lara > > Several functions did not check if destination buffer, used > in snprintf was a non-NULL pointer. Did you noticed any issue without this patch? It seems that all the get_help() cmdline functions are never called

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-27 Thread De Lara Guarch, Pablo
Hi Olivier > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Olivier MATZ > Sent: Friday, June 27, 2014 12:30 PM > To: De Lara Guarch, Pablo; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] string: fix potential seg fault on snprintf &

[dpdk-dev] [PATCH] string: fix potential seg fault on snprintf

2014-06-27 Thread Pablo de Lara
From: Pablo de Lara Several functions did not check if destination buffer, used in snprintf was a non-NULL pointer. Signed-off-by: Pablo de Lara --- examples/cmdline/parse_obj_list.c|3 +++ lib/librte_cmdline/cmdline_parse_etheraddr.c |3 +++ lib/librte_cmdline/cmdline_pars