[PATCH] app/graph: fix destination buffer too small
Mahmoud Matook
mahmoudmatook.mm at gmail.com
Wed Jun 26 22:22:58 CEST 2024
On 06/23, Stephen Hemminger wrote:
> On Mon, 24 Jun 2024 00:09:21 +0400
> Mahmoud Maatuq <mahmoudmatook.mm at gmail.com> wrote:
>
> > as sizeof(config.rx.mempool_name) is < sizeof(res->mempool), it's safer
> > to copy min size of them to avoide out of bound memory write.
> >
> > Coverity issue: 415430
> > Fixes: 3850cb06ab9c ("app/graph: add ethdev commands")
> > Cc: skori at marvell.com
> >
> > Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm at gmail.com>
>
> NAK, this could create an invalid not null terminated string.
>
> Since mempool name is a null terminated string this should have always
> used strlcpy instead of memcpy.
in patch v2 of this it's changed to strlcpy but we got truncation
warning as source buffer size is 128 and the dest buffer size is 26
can we incrase the size of the source buffer ?
More information about the dev
mailing list