We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6111acc commit daf53d3Copy full SHA for daf53d3
src/debug/elf/file.go
@@ -1659,6 +1659,14 @@ func (f *File) DynValue(tag DynTag) ([]uint64, error) {
1659
// Parse the .dynamic section as a string of bytes.
1660
var vals []uint64
1661
for len(d) > 0 {
1662
+ dynSize := 8
1663
+ if f.Class == ELFCLASS64 {
1664
+ dynSize = 16
1665
+ }
1666
+ if len(d)%dynSize != 0 {
1667
+ return nil, errors.New("length of dynamic section is not a multiple of dynamic entry size")
1668
1669
+
1670
var t DynTag
1671
var v uint64
1672
switch f.Class {
0 commit comments