diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 19:51:55 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 19:51:55 +0000 |
commit | 4ece1c45a770b1916f0f3eafd41b591e229dbb09 (patch) | |
tree | 74ae27a94cc67da9036cd7e9b9873b5142d32950 /chrome_frame/test | |
parent | 4512cb5735330f497d018191595d9bd5ce902ac2 (diff) | |
download | chromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.zip chromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.tar.gz chromium_src-4ece1c45a770b1916f0f3eafd41b591e229dbb09.tar.bz2 |
Fix a ChromeFrame crash which was reported in the crash server in the helper function to return the path
to the IE temporary internet files folder. The crash occurs because of dereferencing a NULL parent IShellFolder
interface. Fix is to bail out and use the SHGetFolderPath function if the SHGetFolderLocation and the SHBindToParent APIs fail for some reason. The SHGetFolderPath function has a limit of MAX_PATH characters.
Added a unit test for the GetIETemporaryFilesFolder helper function.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=40266
Bug=40266
Review URL: http://codereview.chromium.org/1523010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/util_unittests.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome_frame/test/util_unittests.cc b/chrome_frame/test/util_unittests.cc index 6e066a1..c589416 100644 --- a/chrome_frame/test/util_unittests.cc +++ b/chrome_frame/test/util_unittests.cc @@ -104,3 +104,8 @@ TEST(UtilTests, GuidToString) { EXPECT_EQ(0, str_guid.compare(compare)); EXPECT_EQ(static_cast<size_t>(lstrlenW(compare)), str_guid.length()); } + +TEST(UtilTests, GetTempInternetFiles) { + FilePath path = GetIETemporaryFilesFolder(); + EXPECT_FALSE(path.empty()); +} |