Chromium Code Reviews| Index: chrome/utility/importer/ie_importer_win.cc |
| diff --git a/chrome/utility/importer/ie_importer_win.cc b/chrome/utility/importer/ie_importer_win.cc |
| index 486997ddc96cfe31e505ba97fabac26da40208af..614476957d50db648ba92c06ae478c541cfb0de3 100644 |
| --- a/chrome/utility/importer/ie_importer_win.cc |
| +++ b/chrome/utility/importer/ie_importer_win.cc |
| @@ -197,7 +197,7 @@ bool ParseFavoritesOrderBlob( |
| LPCITEMIDLIST idlist = BinaryReadItemIDList( |
| base_offset + kItemIDListOffset, item_size - kItemIDListOffset, blob); |
| TCHAR item_filename[MAX_PATH]; |
| - if (!idlist || FAILED(SHGetPathFromIDList(idlist, item_filename))) |
| + if (!idlist || !SHGetPathFromIDList(idlist, item_filename)) |
|
scottmg
2014/10/31 22:40:53
Yup, that just looks wrong.
|
| return false; |
| base::FilePath item_relative_path = |
| path.Append(base::FilePath(item_filename).BaseName()); |
| @@ -877,6 +877,7 @@ int IEImporter::CurrentIEVersion() const { |
| DWORD buffer_length = sizeof(buffer); |
| base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); |
| LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); |
| + buffer[arraysize(buffer) - 1] = 0; |
|
scottmg
2014/10/31 22:40:53
the docs http://msdn.microsoft.com/en-us/library/w
Ilya Sherman
2014/10/31 22:45:05
Agreed, using a function that guarantees a null-te
|
| version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); |
| } |
| return version; |