srv6-mobile: Fix the coverity issue 31/34931/2
authorTetsuya Murakami <tetsuya.mrk@gmail.com>
Tue, 18 Jan 2022 11:43:07 +0000 (03:43 -0800)
committerOle Tr�an <otroan@employees.org>
Tue, 18 Jan 2022 13:52:59 +0000 (13:52 +0000)
Type: fix

Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: I35c36401ce3ab59900be59a9abddba66f6399978

src/plugins/srv6-mobile/node.c

index 36445a6..ed0697a 100644 (file)
@@ -664,9 +664,9 @@ VLIB_NODE_FN (srv6_end_m_gtp4_e)
                  srv6_end_rewrite_trace_t *tr =
                    vlib_add_trace (vm, node, b0, sizeof (*tr));
                  clib_memcpy (tr->src.as_u8, hdr0->ip4.src_address.as_u8,
-                              sizeof (tr->src.as_u8));
+                              sizeof (hdr0->ip4.src_address.as_u8));
                  clib_memcpy (tr->dst.as_u8, hdr0->ip4.dst_address.as_u8,
-                              sizeof (tr->dst.as_u8));
+                              sizeof (hdr0->ip4.dst_address.as_u8));
                  tr->teid = hdr0->gtpu.teid;
                }
            }