dreamstreat / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

kmldom::ExpatParser::ParseString string uses c_str() #121

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. provide xml in an encoding permitting null bytes
2. std::string.c_str() will cut the input at the null
3. oops

What is the expected output? What do you see instead?

use string.data(), string.size() (like ParseBuffer does)

Please use labels and text to provide additional information.

Original issue reported on code.google.com by kml.b...@gmail.com on 23 Sep 2009 at 3:25

GoogleCodeExporter commented 8 years ago
This is an expat issue. Sending a literal '\0' char anywhere (even in char 
data) will
cause expat to stop parsing and return.

Original comment by kml.mash...@gmail.com on 8 Oct 2009 at 6:08