Merge pull request #8722 from opensourcerouting/ospfv3-asan-crash

ospf6d: fix address sanitizer crash
This commit is contained in:
Donald Sharp 2021-05-24 12:53:03 -04:00 committed by GitHub
commit 978f4b32eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1282,7 +1282,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
/* create new entry */
route = ospf6_route_create();
route->type = OSPF6_DEST_TYPE_NETWORK;
memcpy(&route->prefix, prefix, sizeof(struct prefix));
prefix_copy(&route->prefix, prefix);
info = (struct ospf6_external_info *)XCALLOC(
MTYPE_OSPF6_EXTERNAL_INFO, sizeof(struct ospf6_external_info));