aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/spnego/spnego.cnf
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-09-21 23:23:58 +0000
committerGuy Harris <guy@alum.mit.edu>2005-09-21 23:23:58 +0000
commit341a2f503d3d5c71d83156b56c8c34135873c40e (patch)
tree3a8d650a077fb86f40840d8fc986717b1998cdfc /asn1/spnego/spnego.cnf
parentced076f8d4babc5b942b2fb96065b467f3957a7b (diff)
dissect_ber_octet_string() can return a null tvbuff pointer, if the
putative octet string isn't one; always check before using it to dissect, and don't call the dissector if the tvbuff is null. This should fix bug 472. svn path=/trunk/; revision=15946
Diffstat (limited to 'asn1/spnego/spnego.cnf')
-rw-r--r--asn1/spnego/spnego.cnf23
1 files changed, 11 insertions, 12 deletions
diff --git a/asn1/spnego/spnego.cnf b/asn1/spnego/spnego.cnf
index b57161c310..1ebd727d5e 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -101,14 +101,11 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
%(DEFAULT_BODY)s
- if (! mechToken_tvb) {
- THROW(ReportedBoundsError);
- }
-
/*
- * Now, we should be able to dispatch after creating a new TVB.
+ * Now, we should be able to dispatch, if we've gotten a tvbuff for
+ * the token and we have information on how to dissect its contents.
*/
- if (next_level_value)
+ if (mechToken_tvb && next_level_value)
call_dissector(next_level_value->handle, mechToken_tvb, pinfo, tree);
@@ -145,7 +142,7 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
/*
* Now, we should be able to dispatch with that tvbuff.
*/
- if (next_level_value)
+ if (mechListMIC_tvb && next_level_value)
call_dissector(next_level_value->handle, mechListMIC_tvb, pinfo, tree);
return offset;
}
@@ -187,12 +184,13 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
/*
- * Now, we should be able to dispatch with that tvbuff.
+ * Now, we should be able to dispatch, if we've gotten a tvbuff for
+ * the token and we have information on how to dissect its contents.
* However, we should make sure that there is something in the
* response token ...
*/
- if (tvb_reported_length(responseToken_tvb) > 0) {
- if (next_level_value)
+ if (responseToken_tvb && next_level_value) {
+ if (tvb_reported_length(responseToken_tvb) > 0)
call_dissector(next_level_value->handle, responseToken_tvb, pinfo, tree);
}
@@ -210,9 +208,10 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
/*
- * Now, we should be able to dispatch with that tvbuff.
+ * Now, we should be able to dispatch, if we've gotten a tvbuff for
+ * the MIC and we have information on how to dissect its contents.
*/
- if (next_level_value)
+ if (mechListMIC_tvb && next_level_value)
call_dissector(next_level_value->handle, mechListMIC_tvb, pinfo, tree);