Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: courgette/disassembler_elf_32_x86.cc

Issue 10830021: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | courgette/patcher_x86_32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "courgette/disassembler_elf_32_x86.h" 5 #include "courgette/disassembler_elf_32_x86.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 13
14 #include "courgette/assembly_program.h" 14 #include "courgette/assembly_program.h"
15 #include "courgette/courgette.h" 15 #include "courgette/courgette.h"
16 #include "courgette/encoded_program.h" 16 #include "courgette/encoded_program.h"
17 17
18 namespace courgette { 18 namespace courgette {
19 19
20 DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length) 20 DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length)
21 : Disassembler(start, length) { 21 : Disassembler(start, length),
22 header_(NULL),
23 section_header_table_(NULL),
24 section_header_table_size_(0),
25 program_header_table_(NULL),
26 program_header_table_size_(0),
27 default_string_section_(NULL) {
22 } 28 }
23 29
24 bool DisassemblerElf32X86::ParseHeader() { 30 bool DisassemblerElf32X86::ParseHeader() {
25 if (length() < sizeof(Elf32_Ehdr)) 31 if (length() < sizeof(Elf32_Ehdr))
26 return Bad("Too small"); 32 return Bad("Too small");
27 33
28 header_ = (Elf32_Ehdr *)start(); 34 header_ = (Elf32_Ehdr *)start();
29 35
30 // Have magic for elf header? 36 // Have magic for elf header?
31 if (header_->e_ident[0] != 0x7f || 37 if (header_->e_ident[0] != 0x7f ||
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 continue; 581 continue;
576 } 582 }
577 } 583 }
578 p += 1; 584 p += 1;
579 } 585 }
580 586
581 return true; 587 return true;
582 } 588 }
583 589
584 } // namespace courgette 590 } // namespace courgette
OLDNEW
« no previous file with comments | « no previous file | courgette/patcher_x86_32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698