Don't assume that there will be another null byte
llvm-svn: 271029
This commit is contained in:
parent
ec73d8b383
commit
bccdf597fb
|
|
@ -142,6 +142,8 @@ struct serialize_null_term_string_array_impl {
|
|||
if (auto EC = consume(Data, Field))
|
||||
return EC;
|
||||
Item.push_back(Field);
|
||||
if (Data.empty())
|
||||
return std::make_error_code(std::errc::illegal_byte_sequence);
|
||||
}
|
||||
Data = Data.drop_front(1);
|
||||
return std::error_code();
|
||||
|
|
|
|||
Loading…
Reference in New Issue