Wireshark-bugs: [Wireshark-bugs] [Bug 8070] Patch for packet-coap.c

Date: Sun, 09 Dec 2012 18:26:59 +0000

changed bug 8070

What Removed Added
Status UNCONFIRMED INCOMPLETE
CC   [email protected]
Ever confirmed   1

Comment # 1 on bug 8070 from
Hi Shoichi, I haven't had time to do a full review, but here are a couple of
things that have popped out at me:

- The functions coap_opt_is_valid, coap_opt_len_min and coap_opt_len_max are
all only ever used together. It would be much more efficient to replace them
all with a "coap_opt_get" function that returns a pointer to a struct
coap_option_range_t (or NULL if the option type is invalid). Then it would only
have to loop through the list of options once instead of three times.

- You replace some proto_tree_add_item calls with proto_tree_add_text. This is
generally discouraged as the values can no longer be filtered on this way
(there are some cases where it is unavoidable, unfortunately). Is there a
particular reason you replaced these, or can they be left as is? New code
should try to use proto_tree_add_item where possible, for the same reason.

- You say you fuzz-tested the changes, which implies you have a capture. If you
could attach the capture to the bug so that it gets picked up by the
auto-tester, that would be appreciated.

Thanks,
Evan


You are receiving this mail because:
  • You are watching all bug changes.