File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,14 @@ func (p *Packet) MarshalBinary() ([]byte, error) {
125125 // 1 byte : protocol length
126126 // 2 bytes: operation
127127 // N bytes: source hardware address
128- // 4 bytes: source protocol address
128+ // N bytes: source protocol address
129129 // N bytes: target hardware address
130- // 4 bytes: target protocol address
131- b := make ([]byte , 2 + 2 + 1 + 1 + 2 + 4 + 4 + (p .HardwareAddrLength * 2 ))
130+ // N bytes: target protocol address
131+
132+ // Though an IPv4 address should always 4 bytes, go-fuzz
133+ // very quickly created several crasher scenarios which
134+ // indicated that these values can lie.
135+ b := make ([]byte , 2 + 2 + 1 + 1 + 2 + (p .IPLength * 2 )+ (p .HardwareAddrLength * 2 ))
132136
133137 // Marshal fixed length data
134138
You can’t perform that action at this time.
0 commit comments