summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 23:57:23 +0000
committercdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 23:57:23 +0000
commita11b00cf82c61489fe42878204375524fa2f952a (patch)
treedc26cd9c6c767b283a4c2a1a7e10023607326b48 /ui
parented44f3cafb0d402a0772159b95d87acb090ac920 (diff)
downloadchromium_src-a11b00cf82c61489fe42878204375524fa2f952a.zip
chromium_src-a11b00cf82c61489fe42878204375524fa2f952a.tar.gz
chromium_src-a11b00cf82c61489fe42878204375524fa2f952a.tar.bz2
Check to ensure that html data stored to the windows clipboard is well formed
BUG=181710 TEST=N/A Review URL: https://chromiumcodereview.appspot.com/12667017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/clipboard/clipboard_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 08f14b1..a376ba5 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -520,8 +520,8 @@ void Clipboard::ReadHTML(Clipboard::Buffer buffer, string16* markup,
html_start == std::string::npos)
return;
- DCHECK_GE(start_index, html_start);
- DCHECK_GE(end_index, html_start);
+ if (start_index < html_start || end_index < start_index)
+ return;
std::vector<size_t> offsets;
offsets.push_back(start_index - html_start);