forked from osmocom/wireshark
Thou shalt not g_assert() in a dissector.
svn path=/trunk/; revision=13875
This commit is contained in:
parent
d4d1206ad5
commit
5a6cf59062
|
@ -323,6 +323,13 @@ packets without crashing or looping infinitely.
|
|||
Here are some suggestions for making dissectors more robust in the face
|
||||
of incorrectly-formed packets:
|
||||
|
||||
Do *NOT* use "g_assert()" or "g_assert_not_reached()" in dissectors.
|
||||
*NO* value in a packet's data should be considered "wrong" in the sense
|
||||
that it's a problem with the dissector if found; if it cannot do
|
||||
anything else with a particular value from a packet's data, the
|
||||
dissector should put into the protocol tree an indication that the
|
||||
value is invalid, and should return.
|
||||
|
||||
If you are allocating a chunk of memory to contain data from a packet,
|
||||
or to contain information derived from data in a packet, and the size of
|
||||
the chunk of memory is derived from a size field in the packet, make
|
||||
|
|
Loading…
Reference in New Issue