Ethereal-dev: [Ethereal-dev] [patch] Ethereal 0.10.12 crashes in the ASN.1 plugin
Hello,
I am using the generic ASN.1 decoder plugin, and starting with the
0.10.12 it does not work any more. I have compiled a description table
with snacc, and specified this table in the ASN.1 preferences. When I
click on [Apply], Ethereal crashes. It also crashed one startup when
the two preferences asn1.file and asn1.pdu_name are defined.
This problem must have appeared in the last few weak, because I did
compile a subversion version about 3 weeks ago, and the worked fine. I
suspect that the problematic patch is Revision 15037.
Looking at the code, it seems that the following two lines in
packet-asn1.c are funny (5075-5076):
udp_ports_asn1 = range_copy(global_udp_ports_asn1);
udp_ports_asn1 = range_copy(global_udp_ports_asn1);
The last one should probably read sctp instead of udp.
With this change it works fine. A patch is attached, please apply.
Thomas
diff -u ethereal-0.10.12/plugins/asn1/packet-asn1.c ethereal-0.10.12.new/plugins/asn1/packet-asn1.c
--- ethereal-0.10.12/plugins/asn1/packet-asn1.c 2005-07-26 21:26:00.000000000 +0200
+++ ethereal-0.10.12.new/plugins/asn1/packet-asn1.c 2005-08-05 14:33:46.803347781 +0200
@@ -5073,4 +5073,4 @@
#else
tcp_ports_asn1 = range_copy(global_tcp_ports_asn1);
udp_ports_asn1 = range_copy(global_udp_ports_asn1);
- udp_ports_asn1 = range_copy(global_udp_ports_asn1);
+ sctp_ports_asn1 = range_copy(global_sctp_ports_asn1);
range_foreach(tcp_ports_asn1, register_tcp_port);
range_foreach(udp_ports_asn1, register_udp_port);