[dpdk-dev] [PATCH 1/2] app/crypto-perf: use strcpy for allocated string

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed May 16 11:50:15 CEST 2018



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jerin Jacob
> Sent: Wednesday, May 16, 2018 7:40 AM
> To: dev at dpdk.org
> Cc: thomas at monjalon.net; Jerin Jacob <jerin.jacob at caviumnetworks.com>;
> Doherty, Declan <declan.doherty at intel.com>; andy at warmcat.com;
> stable at dpdk.org
> Subject: [dpdk-dev] [PATCH 1/2] app/crypto-perf: use strcpy for allocated string
> 
> inlined from ‘cperf_test_vector_get_from_file’ at
> ../app/test-crypto-perf/cperf_test_vector_parsing.c:578:11:
> ../app/test-crypto-perf/cperf_test_vector_parsing.c:510:3: error:
> ‘strncpy’ output truncated before terminating nul copying as many bytes from a
> string as its length [-Werror=stringop-truncation]
>    strncpy(entry, line, strlen(line));
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../app/test-crypto-perf/cperf_test_vector_parsing.c:528:5: error:
> ‘strncat’ output truncated before terminating nul copying as many bytes from a
> string as its length [-Werror=stringop-truncation]
>      strncat(entry, line, strlen(line));
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Found this issue with meson build and gcc 8.1.
> 
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
> 
> Cc: declan.doherty at intel.com
> Cc: andy at warmcat.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>


More information about the dev mailing list