Commit 20724211 authored by xiaofeng@google.com's avatar xiaofeng@google.com

Fix issue 378

parent a269a2c4
......@@ -398,7 +398,8 @@ GenerateMergeFromCodedStream(io::Printer* printer) const {
descriptor_->type() == FieldDescriptor::TYPE_STRING) {
printer->Print(variables_,
"::google::protobuf::internal::WireFormat::VerifyUTF8String(\n"
" this->$name$(0).data(), this->$name$(0).length(),\n"
" this->$name$(this->$name$_size() - 1).data(),\n"
" this->$name$(this->$name$_size() - 1).length(),\n"
" ::google::protobuf::internal::WireFormat::PARSE);\n");
}
}
......
......@@ -243,7 +243,8 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_file_to_generate()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->file_to_generate(0).data(), this->file_to_generate(0).length(),
this->file_to_generate(this->file_to_generate_size() - 1).data(),
this->file_to_generate(this->file_to_generate_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
......
......@@ -1065,7 +1065,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_dependency()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->dependency(0).data(), this->dependency(0).length(),
this->dependency(this->dependency_size() - 1).data(),
this->dependency(this->dependency_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment