buildbot reported bug fixed: prevent an endless loop

But what's the right way to do instead? Just inserted a return, this should do no harm.

Could someone with more knowledge of this dissector review this change?

svn path=/trunk/; revision=13878
This commit is contained in:
Ulf Lamping 2005-03-23 09:08:36 +00:00
parent 98b3ae923f
commit 42301df7bf
1 changed files with 6 additions and 1 deletions

View File

@ -1457,7 +1457,12 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Data (%d bytes)", tvb_get_guint8(tvb, offset2+l+1));
break;
}
l += tvb_get_guint8(tvb, offset2+l+1);
if (tvb_get_guint8(tvb, offset2+l+1) != 0) {
l += tvb_get_guint8(tvb, offset2+l+1);
} else {
/* XXX - prevent an endless loop here, but what's the right way to do instead? */
return tvb_length(tvb);
}
}
break;