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

Unified Diff: base/clipboard_util.cc

Issue 19763: fix off by one in offset values for cf_html. (Closed)
Patch Set: Created 11 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/clipboard_util.cc
diff --git a/base/clipboard_util.cc b/base/clipboard_util.cc
index a9e7d2afbf4b40fb651b05df1783eb12e50531a4..e56166d87673a55f3b262e61fef688c0e11bb445 100644
--- a/base/clipboard_util.cc
+++ b/base/clipboard_util.cc
@@ -429,7 +429,7 @@ std::string ClipboardUtil::HtmlToCFHtml(const std::string& html,
MAX_DIGITS * 4;
if (!base_url.empty()) {
start_html_offset += strlen(source_url_prefix) +
- base_url.length() + 1;
+ base_url.length() + 2; // Add 2 for \r\n.
}
size_t start_fragment_offset = start_html_offset + strlen(start_markup);
size_t end_fragment_offset = start_fragment_offset + html.length();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698