aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-26 18:42:12 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-26 18:42:12 +0000
commit58e628ac5c770fa6dab2015200aa9b04918f6b9a (patch)
treeab7a00460e5b6b905cffe7c649701661d4a17dc4
parent3d9f74a062691942c907d43774648a51bc0cdd67 (diff)
don't use -1 if the remaining length (the fragment length) is actually zero, this will throw an Exception
svn path=/trunk/; revision=15542
-rw-r--r--epan/dissectors/packet-clnp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c
index 083c06ae50..53a4df34ee 100644
--- a/epan/dissectors/packet-clnp.c
+++ b/epan/dissectors/packet-clnp.c
@@ -1023,7 +1023,8 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
}
}
if (fragment && reassembled_tvb == NULL) {
- proto_tree_add_text(cotp_tree, tvb, offset, -1,
+ /* don't use -1 if fragment length is zero (throws Exception) */
+ proto_tree_add_text(cotp_tree, tvb, offset, (fragment_length) ? -1 : 0,
"User data (%u byte%s)", fragment_length,
plurality(fragment_length, "", "s"));
}