Wireshark mailing list archives
Problem with val_to_str inside BASE_CUSTOM callback function
From: Thomas Wiens <th.wiens () gmx de>
Date: Fri, 21 Oct 2016 18:57:49 +0200
Hi, I'am using fieldtype BASE_CUSTOM and a callback function in my own dissector. Works well, but when I am calling val_to_str with a value which is not inside the value_string list, then wireshark crashes. This happens only when calling val_to_str inside the callback function. When outside, then all is Ok (getting formatted result string on failure). When I'm calling try_val_to_str_idx with a non existing value, then I get -1 as index and NULL as result as expected, so I guess the problem is: wmem_strdup_printf(wmem_packet_scope(), fmt, val); Is there a limitation when I'm using format callbacks, or is this a bug? -- Cheers Thomas ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Problem with val_to_str inside BASE_CUSTOM callback function Thomas Wiens (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Guy Harris (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Jaap Keuter (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Guy Harris (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Thomas Wiens (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Michael Mann (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Thomas Wiens (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Jaap Keuter (Oct 21)
- Re: Problem with val_to_str inside BASE_CUSTOM callback function Guy Harris (Oct 21)