Merge pull request #407 from Mattiwatti/ignore-bogus-tls-relocs

PE: only add a TLS relocation if tls_handler_offset_reloc != 0
This commit is contained in:
John Reiser
2020-11-06 14:11:00 -08:00
committed by GitHub
+1 -1
View File
@@ -1378,7 +1378,7 @@ void PeFile::processTls2(Reloc *rel,const Interval *iv,unsigned newaddr,
return; return;
// add new relocation entries // add new relocation entries
if __acc_cte(tls_handler_offset_reloc > 0) if __acc_cte(tls_handler_offset > 0 && tls_handler_offset_reloc > 0)
rel->add(tls_handler_offset + tls_handler_offset_reloc, reloc_type); rel->add(tls_handler_offset + tls_handler_offset_reloc, reloc_type);
unsigned ic; unsigned ic;