https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6600
--- Comment #3 from Jaap Keuter <jaap.keuter@xxxxxxxxx> 2011-11-21 12:49:04 CET ---
Quick review:
Why the include "packet-tpkt.h".
Loose the use_dissector preference.
Use defines for command codes and use them in the value_sting and switch.
Try to stay away from mixed case Hungarian notation and adhere to the more
commonly used underscore notation.
Use more defensive programming; what happens when tvb_length returns -1?
Stay away from code like: "p = tvb_get_ptr; switch(p[i]);". This voids all the
protections which TVBs give you and break your dissector in many nasty ways
once feed corrupt data. As far as I can see you don't need it, the TVB function
set provides enough features to accomplish what you need, safely.
Which leads us to the last question: Did you fuzztest your dissector?
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.