diff options
author | Cary Coutant <ccoutant@google.com> | 2008-06-25 17:10:08 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2008-06-25 17:10:08 +0000 |
commit | 3f2e6a2da5d9348efaa98eb06c430bec5fbe596b (patch) | |
tree | bcc83ddeb7ca9e2c1b44767bb6246ffecd594b92 /gold/fileread.cc | |
parent | c8187e1509b28d4d9c0bbc2de688144ef80537c0 (diff) | |
download | gdb-3f2e6a2da5d9348efaa98eb06c430bec5fbe596b.zip gdb-3f2e6a2da5d9348efaa98eb06c430bec5fbe596b.tar.gz gdb-3f2e6a2da5d9348efaa98eb06c430bec5fbe596b.tar.bz2 |
2008-06-25 Cary Coutant <ccoutant@google.com>
* fileread.cc (File_read::make_view): Assert on zero-length view.
* object.cc (Sized_relobj::do_read_symbols): Don't try to read
symbol table when there are no symbols to read.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r-- | gold/fileread.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc index 6cb056f..cfe0ee6 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -327,6 +327,8 @@ File_read::View* File_read::make_view(off_t start, section_size_type size, unsigned int byteshift, bool cache) { + gold_assert(size > 0); + off_t poff = File_read::page_offset(start); section_size_type psize = File_read::pages(size + (start - poff)); |