File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
stdlib/public/RuntimeModule Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1475,6 +1475,11 @@ final class ElfImage<SomeElfTraits: ElfTraits>
14751475 let stringSect = ElfStringSection ( source: stringSource)
14761476
14771477 for shdr in sectionHeaders {
1478+ // All other fields are undefined for SHT_NULL
1479+ if shdr. sh_type == . SHT_NULL {
1480+ continue
1481+ }
1482+
14781483 guard let name = stringSect. getStringAt ( index: Int ( shdr. sh_name) ) else {
14791484 continue
14801485 }
@@ -1612,6 +1617,11 @@ final class ElfImage<SomeElfTraits: ElfTraits>
16121617 let stringSect = ElfStringSection ( source: stringSource)
16131618
16141619 for shdr in sectionHeaders {
1620+ // All other fields are undefined for SHT_NULL
1621+ if shdr. sh_type == . SHT_NULL {
1622+ continue
1623+ }
1624+
16151625 guard let sname
16161626 = stringSect. getStringAt ( index: Int ( shdr. sh_name) ) else {
16171627 continue
You can’t perform that action at this time.
0 commit comments