Skip to content

wireshark-3.4.3/epan/dissectors/packet-s7comm.c:3521: bad array index ?

Summary

13 won't fit into 12.

Steps to reproduce

wireshark-3.4.3/epan/dissectors/packet-s7comm.c:3156:43: error: Array 'hf[12]' accessed at index 12, which is out of bounds. [arrayIndexOutOfBounds]

Problem seems to be line 3521:

$ fgrep -n s7comm_decode_pistart_parameters wireshark-3.4.3/epan/dissectors/packet-s7comm.c | fgrep 13 3138:s7comm_decode_pistart_parameters(tvbuff_t *tvb, 3521: s7comm_decode_pistart_parameters(tvb, pinfo, tree, param_tree, servicename, 13, hf, paramoffset); $

What is the current bug behavior?

(What actually happens)

What is the expected correct behavior?

(What you should see instead)

Sample capture file

(If possible attach a sample capture file showing this issue)

Relevant logs and/or screenshots

(Paste any relevant logs)

Build information

(In Wireshark, select Help->About Wireshark from the main menu and use the button "Copy To Clipboard". Please paste the complete output here. Or from the command line, run `tshark -v` or `wireshark -v`)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information