Commit 89c83051 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Fix presubmit failure in gdb-jit.cc.

R=ricow@chromium.org

Review URL: http://codereview.chromium.org/7289013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6543526a
...@@ -267,12 +267,12 @@ class MachOSection : public DebugSectionBase<MachOSectionHeader> { ...@@ -267,12 +267,12 @@ class MachOSection : public DebugSectionBase<MachOSectionHeader> {
header->flags = flags_; header->flags = flags_;
header->reserved1 = 0; header->reserved1 = 0;
header->reserved2 = 0; header->reserved2 = 0;
memset(header->sectname, 0, 16); memset(header->sectname, 0, sizeof(header->sectname));
memset(header->segname, 0, 16); memset(header->segname, 0, sizeof(header->segname));
ASSERT(strlen(name_) < 16); ASSERT(strlen(name_) < sizeof(header->sectname));
ASSERT(strlen(segment_) < 16); ASSERT(strlen(segment_) < sizeof(header->segname));
strcpy(header->sectname, name_); strncpy(header->sectname, name_, sizeof(header->sectname));
strcpy(header->segname, segment_); strncpy(header->segname, segment_, sizeof(header->segname));
} }
private: private:
...@@ -295,7 +295,7 @@ struct ELFSectionHeader { ...@@ -295,7 +295,7 @@ struct ELFSectionHeader {
uintptr_t alignment; uintptr_t alignment;
uintptr_t entry_size; uintptr_t entry_size;
}; };
#if defined(__ELF) #if defined(__ELF)
class ELFSection : public DebugSectionBase<ELFSectionHeader> { class ELFSection : public DebugSectionBase<ELFSectionHeader> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment