Ethereal-dev: [Ethereal-dev] Patch to packet-smb-mailslot.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Peter Johansson <Peter.Johansson@xxxxxxxxxxxx>
Date: Sun, 17 Apr 2005 20:54:40 +0200
The following patch prevents a crash I ran into earlier caused by pinfo->private_data being NULL.

/ Peter

Index: I:/ethereal-win32-libs/epan/dissectors/packet-smb-mailslot.c
===================================================================
--- I:/ethereal-win32-libs/epan/dissectors/packet-smb-mailslot.c (revision 14113) +++ I:/ethereal-win32-libs/epan/dissectors/packet-smb-mailslot.c (working copy)
@@ -116,7 +116,7 @@
    }

    smb_info = pinfo->private_data;
- if (smb_info->sip != NULL && smb_info->sip->extra_info_type == SMB_EI_TRI) + if (smb_info != NULL && smb_info->sip != NULL && smb_info->sip->extra_info_type == SMB_EI_TRI)
        tri = smb_info->sip->extra_info;
    else
        tri = NULL;