aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2005-05-06 02:08:30 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2005-05-06 02:08:30 +0000
commit61e5a33ea2916e1f8905a579c103750b8582d6fb (patch)
tree59ea684ea3e1622f407c1b22156f8edef7fa1b89
parent01a3ed9c587033ed899afe9e1dfd280c0c8f6a34 (diff)
A fix for the previous fix for the infinite loop in bootp, bug #160.
svn path=/trunk/; revision=14323
-rw-r--r--epan/dissectors/packet-bootp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index 5672057a76..3391928c41 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -2728,7 +2728,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const char *dhcp_type = NULL;
const guint8 *vendor_class_id = NULL;
guint16 flags;
- int offset_delta = 0;
+ int offset_delta;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BOOTP");
@@ -2890,7 +2890,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tmpvoff = voff;
at_end = FALSE;
while (tmpvoff < eoff && !at_end) {
- offset_delta += bootp_option(tvb, 0, tmpvoff, eoff, TRUE, &at_end,
+ offset_delta = bootp_option(tvb, 0, tmpvoff, eoff, TRUE, &at_end,
&dhcp_type, &vendor_class_id);
if (offset_delta <= 0) {
THROW(ReportedBoundsError);
@@ -2930,7 +2930,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
at_end = FALSE;
while (voff < eoff && !at_end) {
- offset_delta += bootp_option(tvb, bp_tree, voff, eoff, FALSE, &at_end,
+ offset_delta = bootp_option(tvb, bp_tree, voff, eoff, FALSE, &at_end,
&dhcp_type, &vendor_class_id);
if (offset_delta <= 0) {
THROW(ReportedBoundsError);