Wireshark-bugs: [Wireshark-bugs] [Bug 3069] g_array_append_val should not acdept pointer as argu
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3069
--- Comment #5 from yami <yamisoe@xxxxxxxxx> 2008-11-20 07:38:23 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > This code was added in revision 21686. The commit comment stated this new
> > functionality wasn't tested yet.
> > Luis, this patch and comment makes sense. Was there no further testing/use of
> > this function?
> >
>
> I added that function for completeness when I added the wtap modules. I never
> got it tested because I did not have any files to be decoded with yet-unknown
> encapsulations. The wtap-modules I wrote and couldn't commit (an internal trace
> format whose description is in non-public docs) had had known MTP2/MTP3 encaps.
>
> The patch is correct, that is a sound bug ( in fact two bugs, it fixes a leak
> as well).
>
It is very nice wireshark has this feature :). In fact, I have tested this part
of code. For example, I use this feature to dissect a tar-like format file
(internal format). The code servers both as a format doc and a debug tool.
One downside is make-dissector-reg.py does not respect register_wtap_module().
The code is like:
---- plugin.c ----
G_MODULE_EXPORT void
register_wtap_module(void)
{
{extern void register_wtap_module_emctar(void);
register_wtap_module_emctar(); }
}
---- xxxx.c ----
void
register_wtap_module_xxxx(void)
{
static struct file_type_info ftinfo = {
"XX YY", /* name */
"xxxx", /* shortname */
"*.*", /* extensions */
NULL, /* default extension */
TRUE, /* can compress */
NULL, /* can write encap */
NULL /* can dump open */
};
xxxx_encap_type = wtap_register_encap_type("XX YY", "xxxx");
xxxx_file_type = wtap_register_file_type(&ftinfo);
wtap_register_open_routine(xxxx_open, TRUE);
}
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.