Skip to content

Commit

Permalink
Merge pull request #18 from ApolloAuto/xiaoxq-patch-1
Browse files Browse the repository at this point in the history
Fix use-after-free bug of DataType value.
  • Loading branch information
quning18 authored Sep 1, 2017
2 parents ca1bf3a + c2ed5b6 commit c24806f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct MD5Sum<T, typename boost::enable_if<boost::is_base_of< ::google::protobuf
{
static const char* value()
{
std::string data_type(DataType<T>::value(), strlen(DataType<T>::value()));
std::string data_type(DataType<T>::value());
if (type_md5_map.count(data_type) == 0)
{
type_md5_map[data_type] = ros::md5::MD5(data_type).toStr();
Expand Down

0 comments on commit c24806f

Please sign in to comment.