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

Unified Diff: chrome_frame/test/win_event_receiver.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, 2 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: chrome_frame/test/win_event_receiver.cc
===================================================================
--- chrome_frame/test/win_event_receiver.cc (revision 107404)
+++ chrome_frame/test/win_event_receiver.cc (working copy)
@@ -169,8 +169,8 @@
std::string WindowWatchdog::GetWindowCaption(HWND hwnd) {
std::string caption;
int len = ::GetWindowTextLength(hwnd) + 1;
- ::GetWindowTextA(hwnd, WriteInto(&caption, len), len);
-
+ if (len > 1)
+ ::GetWindowTextA(hwnd, WriteInto(&caption, len), len);
return caption;
}
« no previous file with comments | « chrome_frame/chrome_tab.cc ('k') | chrome_frame/utils.cc » ('j') | crypto/encryptor_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698