[dpdk-stable] [EXT] Re: [dpdk-dev] [PATCH] test/eventdev: fix sprintf with snprintf

Jerin Jacob Kollanukkaran jerinj at marvell.com
Tue Apr 2 03:35:10 CEST 2019


On Mon, 2019-04-01 at 16:37 -0400, Aaron Conole wrote:
> 
> Jerin Jacob Kollanukkaran <jerinj at marvell.com> writes:
> 
> > On Wed, 2019-03-13 at 10:35 -0400, Aaron Conole wrote:
> > > > For all cases I expect truncation trigger a functional error
> > > > which
> > > > should be
> > > > already handled properly, like in this case 'rte_vdev_init()'
> > > > will
> > > > fail in
> > > > second call if buffer is small.
> > > 
> > > And give the user a bad error ("I said net_null1038123825, not
> > > net_null10
> > > - bug in dpdk!").
> > > 
> > > > There may be cases to check the return value, but that should
> > > > be
> > > > the case with
> > > > 'sprintf' as well, changing API to 'snprintf' shouldn't require
> > > > additional check
> > > > by default.
> > > 
> > > I agree, that's true.  I think it's the right thing to do here,
> > > though.
> > 
> > Aaron,
> > 
> > Are you expecting next version of this patch? Or I can merge this
> > patch?
> 
> Go ahead and merge.


Applied to dpdk-next-eventdev/master. Thanks.


More information about the stable mailing list