aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bittorrent.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-10-05 06:37:35 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-10-05 06:37:35 +0000
commitb60266e99ea650084559c6b374e5a511fafd1678 (patch)
treec406ed685f1df1ec889c4f757817468f6b2cfc48 /epan/dissectors/packet-bittorrent.c
parent25e8bfeb47b74622945a0f33cd173df5b26a693e (diff)
bugfix: don't crash, if not enough bytes of the header available
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16124 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-bittorrent.c')
-rw-r--r--epan/dissectors/packet-bittorrent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c
index 9fee7bc7a5..4783833cfa 100644
--- a/epan/dissectors/packet-bittorrent.c
+++ b/epan/dissectors/packet-bittorrent.c
@@ -191,6 +191,9 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto
}
return;
}
+ } else {
+ /* not enough bytes of the header, stop here */
+ return;
}
length = tvb_get_ntohl(tvb, offset);