summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/pnat/pnat_api.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2021-05-06 13:39:55 +0200
committerOle Troan <ot@cisco.com>2021-05-06 13:47:20 +0200
commitec34fb77231c9f601520d6a2eaa5aab8c54253a6 (patch)
treef4afa9689ff86a10cfe34ca9a80fdc8afa3c1a88 /src/plugins/nat/pnat/pnat_api.c
parentf09d655101d2400df91d2a388168b925eea0dc01 (diff)
pnat: coverity errors
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ic38cfbdcab86172bad6ec6cb4c66c83f8deed64f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/plugins/nat/pnat/pnat_api.c')
-rw-r--r--src/plugins/nat/pnat/pnat_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/nat/pnat/pnat_api.c b/src/plugins/nat/pnat/pnat_api.c
index cb7afaaedb1..eaefbaf4738 100644
--- a/src/plugins/nat/pnat/pnat_api.c
+++ b/src/plugins/nat/pnat/pnat_api.c
@@ -143,9 +143,9 @@ static void send_interfaces_details(u32 index, vl_api_registration_t *rp,
REPLY_MACRO_DETAILS4(
VL_API_PNAT_INTERFACES_DETAILS, rp, context, ({
rmp->sw_if_index = i->sw_if_index;
- clib_memcpy(rmp->enabled, i->enabled, PNAT_ATTACHMENT_POINT_MAX);
+ clib_memcpy(rmp->enabled, i->enabled, sizeof(rmp->enabled));
clib_memcpy(rmp->lookup_mask, i->lookup_mask,
- sizeof(vl_api_pnat_mask_t) * PNAT_ATTACHMENT_POINT_MAX);
+ sizeof(rmp->lookup_mask));
/* Endian hack until apigen registers _details
* endian functions */