Skip to content

Commit

Permalink
Fix CPP error from domain prefix check
Browse files Browse the repository at this point in the history
Address unspecifed read 16 bytes from the domain prefix which is only
8 bytes
  • Loading branch information
Mika Tervonen authored and Mika Tervonen committed Apr 27, 2021
1 parent 7e47889 commit 77229ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_bbr_commercial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ void thread_bbr_commercial_route_update(protocol_interface_info_entry_t *cur)
// remove with info and add valid domain prefix again to back bone interface
ipv6_route_table_remove_info(this->backbone_interface_id, ROUTE_THREAD_BBR, NULL);

if (!addr_is_ipv6_unspecified(this->domain_prefix)) {
if (memcmp(this->domain_prefix, ADDR_UNSPECIFIED, 8) != 0) {
// add dua route to backbone, delete dua from on-mesh route
ipv6_route_add_with_info(this->domain_prefix, 64, this->backbone_interface_id, NULL, ROUTE_THREAD_BBR, NULL, 0, 0xffffffff, 0);
tr_info("Hosting pBBR for DUA prefix");
Expand Down

0 comments on commit 77229ee

Please sign in to comment.