summaryrefslogtreecommitdiffstats
path: root/courgette/encoded_program_fuzz_unittest.cc
diff options
context:
space:
mode:
authordgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 13:43:25 +0000
committerdgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 13:43:25 +0000
commit14df9e63ee9497eaed402e00cd4f95bfd2630476 (patch)
tree8d5668dd3313119fc5b6ebf22a089c8559264969 /courgette/encoded_program_fuzz_unittest.cc
parent13daae6db93408e08e373f9ca911d371120cfab6 (diff)
downloadchromium_src-14df9e63ee9497eaed402e00cd4f95bfd2630476.zip
chromium_src-14df9e63ee9497eaed402e00cd4f95bfd2630476.tar.gz
chromium_src-14df9e63ee9497eaed402e00cd4f95bfd2630476.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. 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
Diffstat (limited to 'courgette/encoded_program_fuzz_unittest.cc')
-rw-r--r--courgette/encoded_program_fuzz_unittest.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/courgette/encoded_program_fuzz_unittest.cc b/courgette/encoded_program_fuzz_unittest.cc
index a869bc2..1625fd0 100644
--- a/courgette/encoded_program_fuzz_unittest.cc
+++ b/courgette/encoded_program_fuzz_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -70,7 +70,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;