diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-02-28 14:54:22 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-02-28 14:54:22 +0000 |
commit | 4c26d6ccb3e3a0d156a7400ad4aa5884c0c63c62 (patch) | |
tree | 2ac387fecc035a292df255ff7a6b0a0a17060b26 /epan/dissectors/packet-csn1.c | |
parent | 6eaae55c790d0b50a5945edf3a4b6b014ef9cae7 (diff) |
From Pascal Quantin:
patch to fix the various issues
svn path=/trunk/; revision=36094
Diffstat (limited to 'epan/dissectors/packet-csn1.c')
-rw-r--r-- | epan/dissectors/packet-csn1.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-csn1.c b/epan/dissectors/packet-csn1.c index 50667abbea..4c4da79b8b 100644 --- a/epan/dissectors/packet-csn1.c +++ b/epan/dissectors/packet-csn1.c @@ -120,6 +120,7 @@ gint16 ProcessError(proto_tree *tree, tvbuff_t *tvb, gint bit_offset, unsigned c return err; } +#if 0 static const char* CSN_DESCR_type[]= { "CSN_END", @@ -156,7 +157,7 @@ static const char* CSN_DESCR_type[]= "CSN_TRAP_ERROR" "CSN_???" }; - +#endif /** * ================================================================================================ @@ -858,7 +859,6 @@ gint16 csnStreamDissector(proto_tree *tree, csnStream_t* ar, const CSN_DESCR* pD decode_bits_in_field(bit_offset, no_of_bits, *pui16), pDescr->sz, i++); - *pui16++; bit_offset += no_of_bits; nCount--; } @@ -1438,6 +1438,10 @@ gint16 csnStreamDissector(proto_tree *tree, csnStream_t* ar, const CSN_DESCR* pD { ui32 = tvb_get_bits32(tvb, bit_offset, no_of_bits, FALSE); } + else + { + return ProcessError(tree, tvb, bit_offset,"no_of_bits > 32", -1, pDescr); + } if (ui32 != (unsigned)(gint32)pDescr->offset) { return ProcessError(tree, tvb, bit_offset,"csnStreamDissector FIXED value does not match", -1, pDescr); |