We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c10b3be commit f8d42bdCopy full SHA for f8d42bd
rmw_connextdds_common/src/common/rmw_type_support.cpp
@@ -830,7 +830,12 @@ void RMW_Connext_MessageTypeSupport::type_info(
830
831
if (keyed) {
832
key_callbacks = *callbacks->key_callbacks;
833
- key_serialized_size_max = key_callbacks.max_serialized_size_key(unbounded_key);
+ if (key_callbacks.max_serialized_size_key(unbounded_key) < RTI_CDR_MAX_SERIALIZED_SIZE) {
834
+ key_serialized_size_max = static_cast<uint32_t>(
835
+ key_callbacks.max_serialized_size_key(unbounded_key));
836
+ } else {
837
+ throw std::runtime_error("unbounded_key is bigger than RTI_CDR_MAX_SERIALIZED_SIZE");
838
+ }
839
/* add encapsulation size to static serialized_size_max */
840
if (!unbounded_key) {
841
key_serialized_size_max +=
0 commit comments