diff options
author | dgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 22:24:19 +0000 |
---|---|---|
committer | dgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 22:24:19 +0000 |
commit | 93d529cafc6423e431a88612dff69d06d4f0759f (patch) | |
tree | 46e73fe8ddd2806e23a1309b92cd9ffca33c9ccb /courgette/encoded_program_fuzz_unittest.cc | |
parent | ad2e64c7fae41d9b8053e040fd282b1cf0f8b610 (diff) | |
download | chromium_src-93d529cafc6423e431a88612dff69d06d4f0759f.zip chromium_src-93d529cafc6423e431a88612dff69d06d4f0759f.tar.gz chromium_src-93d529cafc6423e431a88612dff69d06d4f0759f.tar.bz2 |
Start refactoring to reduce executable type knowledge.
This creates executable detection functions, a globally shared enum for
describing an executable type, and reduces the number of classes and
locations with executable specific knowledge.
These changes, along with moving architecture specific classes into their
own files should make it easier to produce special purpose clients that
only contain the code required to apply their own form of patch.
DisassemblerWin32EXE, ImagePE, CourgetteWin32X86PatchGenerator, and
CourgetteWin32X86Patcher, and ensemble handling are all heavily affected here.
This should have no effect on the behavior of the system yet, and is instead
all prep-work.
This is the same as an earlier CL, except that ParseHeader will now return
an error for 64 bit PE executables, and resource only DLLs. This is because
the detection factories depend on ParseHeader to decide if a given file
is supported.
BUG=None
TEST=Unittests
Review URL: http://codereview.chromium.org/7920004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103879 0039d316-1c4b-4281-b951-d872f2087c98
Review URL: http://codereview.chromium.org/8344037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/encoded_program_fuzz_unittest.cc')
-rw-r--r-- | courgette/encoded_program_fuzz_unittest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/courgette/encoded_program_fuzz_unittest.cc b/courgette/encoded_program_fuzz_unittest.cc index 1330510..fbf8df7 100644 --- a/courgette/encoded_program_fuzz_unittest.cc +++ b/courgette/encoded_program_fuzz_unittest.cc @@ -40,7 +40,8 @@ void DecodeFuzzTest::FuzzExe(const char* file_name) const { courgette::AssemblyProgram* program = NULL; const courgette::Status parse_status = - courgette::ParseWin32X86PE(original_buffer, original_length, &program); + courgette::ParseDetectedExecutable(original_buffer, original_length, + &program); EXPECT_EQ(courgette::C_OK, parse_status); courgette::EncodedProgram* encoded = NULL; |