5.13. APIs (C or Traditional C++)
5.13.1. [Minor] Traditional C++ DDS_KeyedString and DDS_KeyedOctets constructors allowed 0 for a string size
In the Traditional C++ API, the constructors for DDS_KeyedString and
DDS_KeyedOctets incorrectly allowed you to pass in 0 for the size of
a string. For example, calling
DDS_KeyedString *keyedString = new DDS_KeyedString(0 /* key_size */, 1 /* size */);
incorrectly resulted in keyedString->key being non-NULL. This
behavior was inconsistent with the C API, whose API
DDS_KeyedString_new_w_size returns NULL if a string size is 0.
[RTI Issue ID CORE-15915]