diff options
Diffstat (limited to 'backends')
-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; |