Reviewers: Michael Starzinger, Description: Unbork Windows 64 bit build and guard against overlong UTF-8 serializations.
Please review this at https://chromiumcodereview.appspot.com/9817005/ SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/api.cc Index: src/api.cc =================================================================== --- src/api.cc (revision 11104) +++ src/api.cc (working copy) @@ -3721,7 +3721,7 @@ previous_character = character; } *last_character = previous_character; - return utf8_bytes + current - buffer; + return static_cast<int>(utf8_bytes + current - buffer); } case i::kSeqStringTag: { const uint16_t* data = @@ -3734,7 +3734,7 @@ previous_character = character; } *last_character = previous_character; - return utf8_bytes + current - buffer; + return static_cast<int>(utf8_bytes + current - buffer); } case i::kSlicedStringTag: { i::SlicedString* slice = i::SlicedString::cast(string); @@ -3818,7 +3818,7 @@ return len; } - if (capacity == -1 || capacity >= string_length * 3) { + if (capacity == -1 || capacity / 3 >= string_length) { int32_t previous = unibrow::Utf16::kNoPreviousCharacter; const int kMaxRecursion = 100; int utf8_bytes = -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
