diff options
author | Marcus Comstedt | 2004-08-25 21:19:47 +0000 |
---|---|---|
committer | Marcus Comstedt | 2004-08-25 21:19:47 +0000 |
commit | d0d7e594d62a407907a264827085fef5951576a9 (patch) | |
tree | 02357b878d477ae60a2f7b4c1beb2fce9b4d73e5 | |
parent | 468404ab3391958a9dbb8d162a2b4490365e9a8d (diff) | |
download | scummvm-rg350-d0d7e594d62a407907a264827085fef5951576a9.tar.gz scummvm-rg350-d0d7e594d62a407907a264827085fef5951576a9.tar.bz2 scummvm-rg350-d0d7e594d62a407907a264827085fef5951576a9.zip |
Only relocate allocated sections.
svn-id: r14753
-rw-r--r-- | backends/dc/dcloader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/dc/dcloader.cpp b/backends/dc/dcloader.cpp index b069255bb7..17c13ceb74 100644 --- a/backends/dc/dcloader.cpp +++ b/backends/dc/dcloader.cpp @@ -300,7 +300,8 @@ bool DLObject::load(int fd) for(int i=0; i<ehdr.e_shnum; i++) if(shdr[i].sh_type == 4 && shdr[i].sh_entsize == sizeof(Elf32_Rela) && - shdr[i].sh_link == symtab_sect) + shdr[i].sh_link == symtab_sect && shdr[i].sh_info < ehdr.e_shnum && + (shdr[shdr[i].sh_info].sh_flags & 2)) if(!relocate(fd, shdr[i].sh_offset, shdr[i].sh_size)) { free(shdr); return false; |