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

Unified Diff: ui/base/clipboard/clipboard_win.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « sandbox/tests/common/controller.cc ('k') | ui/base/l10n/l10n_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_win.cc
===================================================================
--- ui/base/clipboard/clipboard_win.cc (revision 111826)
+++ ui/base/clipboard/clipboard_win.cc (working copy)
@@ -604,7 +604,8 @@
if (count) {
for (int i = 0; i < count; ++i) {
- int size = ::DragQueryFile(drop, i, NULL, 0) + 1;
+ UINT size = ::DragQueryFile(drop, i, NULL, 0) + 1;
+ DCHECK_GT(size, 1u);
std::wstring file;
::DragQueryFile(drop, i, WriteInto(&file, size), size);
files->push_back(FilePath(file));
« no previous file with comments | « sandbox/tests/common/controller.cc ('k') | ui/base/l10n/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698