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

Wireshark-dev: Re: [Wireshark-dev] Memmory handling problem in ANSI TCAP?

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 17 Sep 2007 13:59:48 -0400

On the assumption Anders is gone for the day, I just checked in the g_malloc() change (rev 22892), thanks! Hopefully this will fix bug 1844. (All the strcpy()+strcat() stuff will have to wait for another day, but anyway it appears there is lots of buffer space there.)

BTW, asn1/tcap/Makefile doesn't seem to know about the ANSI TCAP dissector--I had to manually generate it and copy the files over.

Florent Drouin wrote:
     Hi Anders,

I think you should replace the memory allocation in packet_ansi_tcap_templace.c

ansi_tcap_saved_invokedata = g_malloc(sizeof(ansi_tcap_saved_invokedata));
=> ansi_tcap_saved_invokedata = g_malloc(sizeof(struct ansi_tcap_invokedata_t));

And probably replace strcpy by strncpy.
You have to make the same modification in ansi_map dissector.

Regards
Florent

Anders Broman wrote:
Hi,

On WinXP the trace from http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1820 occasionally

crashes Wireshark, any ideas?

Regards

Anders