aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bittorrent.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-10-05 06:37:35 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-10-05 06:37:35 +0000
commit6b3cacb19707c0be4b7185878ec89780c91f351f (patch)
treec406ed685f1df1ec889c4f757817468f6b2cfc48 /epan/dissectors/packet-bittorrent.c
parentaa7a238a429bab3e4deed342285d42c7376f6985 (diff)
bugfix: don't crash, if not enough bytes of the header available
svn path=/trunk/; revision=16124
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);