ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 9323] Buildbot crash output: fuzz-2013-10-25-12569.pcap

Date: Mon, 28 Oct 2013 19:12:07 +0000

changed bug 9323

What Removed Added
See Also   https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5738, https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8382

Comment # 21 on bug 9323 from
(In reply to comment #20)
> (In reply to comment #18)
> > Thoughts?
> 
> Please note that we still have bug #5738 open, if we're making some change
> in API it'd be good to have also 'encoding' as argument.

Hmmm, fair point. Also worth noting is the discussion I had with Guy in March
on bug #8382.

> Still I'd rather see caller responsible for NUL terminating string.
> IMHO dissector should either use proto_tree_add_item() [and don't care about
> encoding, NUL terminating] or use proto_tree_add_[unicode]_string() with
> tvb_get_string_enc().

There are cases where the caller can't assume NUL termination without doing a
copy (with strndup or etc), but then proto_tree_add_string will just take its
own copy. So I guess proto_tree_add_string_count is just an optimization to
avoid the extra copy. The HTTP dissector is already using tvb_get_ptr for
performance reasons, so adding an extra copy kind of defeats the purpose of
that.

Not that it would be a bad thing if tvb_get_ptr went away entirely...


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