guy 2003/02/20 18:11:32 CST
Modified files:
. packet-cops.c
Log:
Don't return a success/failure value from a function if we're not going
to check the value, or if we always return "success".
Have "dissect_cops_object()" check for a bogus object length and give
up, returning an error indication, if it gets one. Also don't store the
object length in a guint16, as we might round it up to a multiple of 4,
and if it's 65535, it gets rounded up to 0, not 65536, if it's 16 bits
long.
Have "dissect_cops_pr_objects()" check for a bogus object length and
give up if it gets one. Also don't store the object length in a
guint16, as we might round it up to a multiple of 4, and if it's 65535,
it gets rounded up to 0, not 65536, if it's 16 bits long.
If "dissect_cops_object()" returns a "bogus length" indication, stop
dissecting.
If we've fetched a value, don't fetch it again to pass it to
"proto_tree_add_uint()". If we haven't fetched the value, don't fetch
it to pass it to "proto_tree_add_uint()", use "proto_tree_add_item()".
Revision Changes Path
1.33 +36 -25 ethereal/packet-cops.c