aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb-pipe.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-03-07 20:47:20 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-03-07 20:47:20 +0000
commit04200dbc9958cefa279c2f65e99f49fa7ea43f79 (patch)
tree050ea511d69279223b2a6778b20694e6b94a6116 /epan/dissectors/packet-smb-pipe.c
parent9a65b8fcf32a38f7bda200cb1e4785aab8954521 (diff)
fix a potential null dereference
found in coverity cid:48 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17509 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb-pipe.c')
-rw-r--r--epan/dissectors/packet-smb-pipe.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index e1276d6482..297b679669 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -3532,7 +3532,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
proto_item *pipe_item = NULL;
proto_tree *pipe_tree = NULL;
int offset;
- int trans_subcmd;
+ int trans_subcmd=0;
int function;
int fid = -1;
guint16 info_level;
@@ -3674,8 +3674,13 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
if (!pinfo->fd->flags.visited)
tri->trans_subcmd = trans_subcmd;
- } else
- trans_subcmd = tri->trans_subcmd;
+ } else {
+ if(tri){
+ trans_subcmd = tri->trans_subcmd;
+ } else {
+ return FALSE;
+ }
+ }
if (tri == NULL) {
/*