Index: media/webm/webm_parser.cc |
diff --git a/media/webm/webm_parser.cc b/media/webm/webm_parser.cc |
index 9952efa58c701d80814a0bb0ab8f57e84d9cff3f..fd5571e765c1bdbd0a5a265858002a853fcbbd95 100644 |
--- a/media/webm/webm_parser.cc |
+++ b/media/webm/webm_parser.cc |
@@ -599,7 +599,8 @@ static int ParseBinary(const uint8* buf, int size, int id, |
static int ParseString(const uint8* buf, int size, int id, |
WebMParserClient* client) { |
- std::string str(reinterpret_cast<const char*>(buf), size); |
+ int length = strnlen(reinterpret_cast<const char*>(buf), size); |
scherkus (not reviewing)
2013/04/16 21:01:00
fyi compile failure on mac
../../media/webm/webm_
|
+ std::string str(reinterpret_cast<const char*>(buf), length); |
return client->OnString(id, str) ? size : -1; |
} |