aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-isis-clv.c4
-rw-r--r--epan/dissectors/packet-nlsp.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-isis-clv.c b/epan/dissectors/packet-isis-clv.c
index 4ad327a74a..b1e90044a8 100644
--- a/epan/dissectors/packet-isis-clv.c
+++ b/epan/dissectors/packet-isis-clv.c
@@ -527,10 +527,14 @@ isis_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 ) {
isis_dissect_unknown(tvb, tree, offset,
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,