Wireshark-bugs: [Wireshark-bugs] [Bug 5372] [PATCH] Wireshark crash when loading capture (SVN on
Date: Fri, 5 Nov 2010 04:27:41 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5372

Yaniv Kaul <mykaul@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|Low                         |Medium
           Platform|Other                       |x86-64
            Summary|Wireshark crash when        |[PATCH] Wireshark crash
                   |loading capture (SVN only?  |when loading capture (SVN
                   |Linux only?)                |only? Linux only?)

--- Comment #2 from Yaniv Kaul <mykaul@xxxxxxxxx> 2010-11-05 04:27:36 PDT ---
This fixes the issue, but I believe there similar cases where this might
happen.

Index: asn1/ldap/packet-ldap-template.c
===================================================================
--- asn1/ldap/packet-ldap-template.c    (revision 34788)
+++ asn1/ldap/packet-ldap-template.c    (working copy)
@@ -456,7 +456,7 @@
      */
     if(attributedesc_string && !strncmp("DomainSid", attributedesc_string,
9)){
         tvbuff_t *sid_tvb;
-        char *tmpstr;
+        char *tmpstr = NULL;

         /* this octet string contains an NT SID */
         sid_tvb=tvb_new_subset(tvb, offset, len, len);



A more generic fix, but one that changes the behaviour for other callers of
dissect_nt_sid() is:

Index: epan/dissectors/packet-windows-common.c
===================================================================
--- epan/dissectors/packet-windows-common.c    (revision 34788)
+++ epan/dissectors/packet-windows-common.c    (working copy)
@@ -1504,13 +1504,13 @@
     na_offset = offset;
     offset++;

+    if(sid_str)
+        *sid_str=NULL;
+
     /* if no tree, just return the offset of the end_of_SID+1 */
     if (!parent_tree)
         return(offset+=(6+(num_auth*4)));

-    if(sid_str)
-        *sid_str=NULL;
-
     if(hf_sid==-1){
         hf_sid=hf_nt_sid;
     }

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.