Ethereal

[Ethereal-dev] Bug fix in packet-iax2.c
Google
 
Web Ethereal.com

Home | Introduction | Documentation | Lists | FAQ | Development | Wiki | Bugs

Ethereal-dev: October 2005


The supplied patch resolves an issue with the use of the not yet initialized variable "fid".

/ Regards, Peter
Index: C:/ethereal-win32-libs/epan/dissectors/packet-iax2.c
===================================================================
--- C:/ethereal-win32-libs/epan/dissectors/packet-iax2.c	(revision 16077)
+++ C:/ethereal-win32-libs/epan/dissectors/packet-iax2.c	(working copy)
@@ -1721,9 +1721,9 @@
     /* then we are continuing an already-started pdu */
     frag_len                     = tvb_reported_length( tvb );
     offset                       = 0;
-    tot_len                      = GPOINTER_TO_UINT(g_hash_table_lookup(iax_call->totlen_table, GUINT_TO_POINTER(fid)));
     if(!pinfo->fd->flags.visited) {
       fid = dirdata->current_frag_id;
+      tot_len                      = GPOINTER_TO_UINT(g_hash_table_lookup(iax_call->totlen_table, GUINT_TO_POINTER(fid)));
       g_hash_table_insert( iax_call->fid_table, GUINT_TO_POINTER(pinfo->fd->num), GUINT_TO_POINTER(fid) );
       frag_offset                  = dirdata->current_frag_bytes;
       complete                     = dirdata->current_frag_bytes > tot_len;

Powered by MHonArc 2.6.10