diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-02 08:25:43 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-02 08:25:43 +0000 |
commit | a5f4e7b85a035b234ca06b0c88ee89eda76d6524 (patch) | |
tree | 4e8a5bc978e41a10fa5415833eb6243fe1bbc4f2 /doc | |
parent | 98cc46f2a4ce695f8a38cbe56c8d87a1cf6873dd (diff) |
Make RX a new style dissector: return 0 if there isn't at least 28 bytes of message or if it receives an unknown Type. Add a check of tvb length to README.developer's cut-n-paste dissector code.
svn path=/trunk/; revision=21300
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.developer | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer index a9a9203c3b..8a317cc7c2 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -733,6 +733,9 @@ dissect_PROTOABBREV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * if someone analyzed that web server's traffic in Wireshark, would result * in Wireshark handing an HTTP packet to your dissector). For example: */ + /* Check that there's enough data */ + if (tvb_length(tvb) < /* your protocol's smallest packet size */) + return 0; /* Get some values from the packet header, probably using tvb_get_*() */ if ( /* these values are not possible in PROTONAME */ ) |