Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: Source/core/dom/Document.cpp

Issue 23532016: Handle odd data lengths in UTF-16 decoder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9cd3a9f7679d3c1801f958ac83661fa97b265316..e18e63b144071dfa02b1af41a5ec5d7b5eadf385 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4107,7 +4107,7 @@ void Document::setEncodingData(const DocumentEncodingData& newData)
CString originalBytes = m_titleElement->textContent().latin1();
OwnPtr<TextCodec> codec = newTextCodec(newData.encoding());
- String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalBytes.length(), true);
+ String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalBytes.length(), DataEOF);
m_titleElement->setTextContent(correctlyDecodedTitle);
}
« no previous file with comments | « LayoutTests/fast/encoding/resources/char-decoding-utils.js ('k') | Source/core/html/parser/TextResourceDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698