diff options
author | Gerald Combs <gerald@wireshark.org> | 2005-05-30 16:03:24 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2005-05-30 16:03:24 +0000 |
commit | 81a381effd474b443828324e52725734a221820c (patch) | |
tree | 4a964af2ffc37e9be1ab66d8336f1d1c64b0a49a /plugins/giop | |
parent | b133b98f15840eb75e2c9b4a3f61ea1fa73cb822 (diff) |
Throw an exception if we're handed a null pointer when we weren't
expecting one. Fixes bug 200.
svn path=/trunk/; revision=14488
Diffstat (limited to 'plugins/giop')
-rw-r--r-- | plugins/giop/packet-coseventcomm.c | 2 | ||||
-rw-r--r-- | plugins/giop/packet-cosnaming.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c index d44ce4231d..6a352a39e7 100644 --- a/plugins/giop/packet-coseventcomm.c +++ b/plugins/giop/packet-coseventcomm.c @@ -704,6 +704,8 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr case Request: case Reply: + if (!operation) + THROW(ReportedBoundsError); if (!strcmp(operation, CosEventComm_PushConsumer_push_op )) { decode_CosEventComm_PushConsumer_push(tvb, pinfo, tree, offset, header, operation); diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c index 057a83dd91..9658658f12 100644 --- a/plugins/giop/packet-cosnaming.c +++ b/plugins/giop/packet-cosnaming.c @@ -288,6 +288,8 @@ static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*gboolean be _U_;*/ /* big endianess */ + if (!header->exception_id) + THROW(ReportedBoundsError); if (!strcmp(header->exception_id, user_exception_CosNaming_NamingContext_NotFound )) { decode_ex_CosNaming_NamingContext_NotFound(tvb, pinfo, tree, offset, header, operation); /* IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 */ @@ -1572,6 +1574,8 @@ static gboolean dissect_cosnaming(tvbuff_t *tvb, packet_info *pinfo, proto_tree case Request: case Reply: + if (!operation) + THROW(ReportedBoundsError); if (!strcmp(operation, CosNaming_NamingContext_bind_op )) { decode_CosNaming_NamingContext_bind(tvb, pinfo, tree, offset, header, operation); |