Skip to content

Commit

Permalink
Fixed segfault
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Dec 6, 2024
1 parent 0b43524 commit a651a3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion rmw_zenoh_cpp/src/detail/graph_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ void GraphCache::parse_put(
{entity->node_name(), node}};
graph_.emplace(std::make_pair(entity->node_namespace(), std::move(node_map)));
update_topic_maps_for_put(node, entity);

total_nodes_in_graph_ += 1;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/liveliness_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Entity::Entity(
// returned to the RMW layer as necessary.
simplified_XXH128_hash_t keyexpr_gid =
simplified_XXH3_128bits(this->liveliness_keyexpr_.c_str(), this->liveliness_keyexpr_.length());
this->gid_.reserve(RMW_GID_STORAGE_SIZE);
this->gid_.resize(RMW_GID_STORAGE_SIZE);
memcpy(this->gid_.data(), &keyexpr_gid.low64, sizeof(keyexpr_gid.low64));
memcpy(this->gid_.data() + sizeof(keyexpr_gid.low64), &keyexpr_gid.high64, sizeof(keyexpr_gid.high64));

Expand Down

0 comments on commit a651a3c

Please sign in to comment.