Wireshark-dev: [Wireshark-dev] Should tvb always be != NULL

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 03 Oct 2008 09:25:07 +0200
Hi list,

Bug 2934 brings to light an interesting question: Should proto_tree_add_??? always have a valid tvb? Sounds logical for every call that adds a value, but not so much for _add_text(). The bug states that there are dissectors which make that call without a tvb, and this leads to a crash. Should the (epan and other) code be prepared for tvb == NULL, or should we DISSECTOR_ASSERT(tvb)?

Thanx,
Jaap