Skip to content

Commit c24806f

Browse files
authored
Merge pull request #18 from ApolloAuto/xiaoxq-patch-1
Fix use-after-free bug of DataType value.
2 parents ca1bf3a + c2ed5b6 commit c24806f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ros/roscpp_core/roscpp_traits/include/ros/protobuffer_traits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct MD5Sum<T, typename boost::enable_if<boost::is_base_of< ::google::protobuf
6969
{
7070
static const char* value()
7171
{
72-
std::string data_type(DataType<T>::value(), strlen(DataType<T>::value()));
72+
std::string data_type(DataType<T>::value());
7373
if (type_md5_map.count(data_type) == 0)
7474
{
7575
type_md5_map[data_type] = ros::md5::MD5(data_type).toStr();

0 commit comments

Comments
 (0)