aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nlsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-nlsp.c')
-rw-r--r--epan/dissectors/packet-nlsp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nlsp.c b/epan/dissectors/packet-nlsp.c
index 7184cea06c..913a9a75e1 100644
--- a/epan/dissectors/packet-nlsp.c
+++ b/epan/dissectors/packet-nlsp.c
@@ -196,10 +196,14 @@ nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
code = tvb_get_guint8(tvb, offset);
offset += 1;
len -= 1;
+ if (len == 0)
+ break;
length = tvb_get_guint8(tvb, offset);
offset += 1;
len -= 1;
+ if (len == 0)
+ break;
if ( len < length ) {
nlsp_dissect_unknown(tvb, tree, offset,