summaryrefslogtreecommitdiffstats
path: root/base/iat_patch.cc
Commit message (Collapse)AuthorAgeFilesLines
* Initialize module_handle_ in IATPatch's constructor.deanm@chromium.org2009-03-181-1/+2
| | | | | | | | | The uninitialized value wasn't used since it was guarded by other members, but it is still better to initialize the member explicitly. Review URL: http://codereview.chromium.org/48130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11959 0039d316-1c4b-4281-b951-d872f2087c98
* Try a new approach to fixing IAT unpatch crashes when the DLL is gone.deanm@chromium.org2009-02-261-21/+17
| | | | | | | | | | | | Have the IAT patcher take some "ownership" of the DLL, by taking a library name and then calling LoadLibrary() / FreeLibrary() to manage the reference count. This means as long is there isn't some other reference count balancing bug happening in the process, the DLL will never be unloaded while we are patched. This effectively reverts r9929, the VirtualQuery additional checks are removed. BUG=7701 Review URL: http://codereview.chromium.org/21453 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10467 0039d316-1c4b-4281-b951-d872f2087c98
* Don't unpatch an unloaded module. We verify if the original function address ↵ananta@chromium.org2009-02-181-3/+19
| | | | | | | | | | | | | | | is still valid with a VirtualQuery call. This fixes http://code.google.com/p/chromium/issues/detail?id=7701 Bug=7701 Review URL: http://codereview.chromium.org/21434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9929 0039d316-1c4b-4281-b951-d872f2087c98
* Hands off the intercept if 'unpatch' failsjoshia@google.com2009-02-041-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | If IATPatchFunction::Unpatch fails during RestoreImportedFunction it means that we cannot safely unpatch the import address table patch. In this case its better to be hands off the intercept as trying to unpatch again in the destructor of IATPatchFunction is not going to be any safer. In real world, when we patch a plugin's SetCursor, we intercept npswf.dll's IAT entry of SetCursor. It seems that our unpatch fails when the plugin ref count goes to 0. It could be because some one else has patched on top of us. Then, during CRT uninitialization at process shutdown, the destructor of IATPatchFunction is called. It detects that we haven't unpatched yet and tries to unpatch. But at this time the plugin DLL is unloaded and the IAT thunk is invalid. There's no point in trying to unpatch unloaded DLL's IAT :) BUG=6886 Review URL: http://codereview.chromium.org/21044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9142 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+246
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98