[dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump overlapping

Jiawei(Jonny) Wang jiaweiw at nvidia.com
Fri Jan 8 09:31:49 CET 2021



> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, January 6, 2021 11:56 PM
> To: Jiawei(Jonny) Wang <jiaweiw at nvidia.com>
> Cc: ferruh.yigit at intel.com; wenzhuo.lu at intel.com; beilei.xing at intel.com;
> bernard.iremonger at intel.com; Ori Kam <orika at nvidia.com>; Slava
> Ovsiienko <viacheslavo at nvidia.com>; NBU-Contact-Thomas Monjalon
> <thomas at monjalon.net>; Raslan Darawsheh <rasland at nvidia.com>;
> dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump
> overlapping
> 
> On Wed,  6 Jan 2021 16:13:37 +0200
> Jiawei Wang <jiaweiw at nvidia.com> wrote:
> 
> > +	int buf_size = MAX_STRING_LEN;
> > +	char print_buf[buf_size];
> 
> Don't use dynamic sized array if you don't have to.
> Various static checkers can see look for out of bounds access to fixed size
> array.

Ok, I will change to :
char print_buf[MAX_STRING_LEN];

Thanks.



More information about the dev mailing list