Jeff Morriss
changed
bug 9120
Comment # 5
on bug 9120
from Jeff Morriss
(In reply to comment #1)
> Apparently the private_data pointer is still pointing to a TCP struct when
> it reaches code that expects it to be an SMB struct, and this happens. Not
> sure at which point in the stack trace we're supposed to be able to find an
> SMB struct to assign.
>
> It appears that it's *only* used for determining whether or not to extract
> strings using Unicode (presumably yes, for smb2) so it may be enough to just
> point it to a temporary struct on the stack with that member initialized,
> and then restore the old version after.
>
> This seems in general like an error-prone way of storing and communicating
> data, especially when a dissector could be called from several different
> higher-layer protocols and thus can't know what to cast private_data to.
> Does anyone know if this has been deprecated in favour of some better
> method? p_get_proto_data() doesn't seem appropriate because it's
> persistent...
(Without having looked at the bug other than to read your comments):
I thought that this was the purpose of the (relatively new) 'data' parameter to
dissector_try_uint_new(), call_dissector_only(), dissector_try_heuristic() and
others. r44860's commit message explains some; check the commit log of
packet.h too.
You are receiving this mail because:
- You are watching all bug changes.