ethdev: avoid undefined behaviour on configuration copy
authorAndrew Rybchenko <arybchenko@solarflare.com>
Tue, 19 Nov 2019 08:22:50 +0000 (08:22 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:06 +0000 (17:36 +0100)
commit6e18704b7e19855a0744cf4b291f1d1fe874d710
tree6a10eb7e4baacd8a6f085042d5d7e6a610f69870
parent3b4888d53d6b1dc719d1afe8fac7efebebcf0925
ethdev: avoid undefined behaviour on configuration copy

memcpy() source and destination areas must not overlap and equal
pointers is the case which is really met, so handle it.

Fixes: 68b931bff287 ("ethdev: eliminate interim variable")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ethdev/rte_ethdev.c