aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x509sat.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-03 22:28:35 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-03-03 22:28:35 +0000
commitf7d24e93b740af73942d8ed877b350ed987b9e6b (patch)
tree39ea11a97388eae037c6e405c9b85814df1d312b /epan/dissectors/packet-x509sat.c
parent00061c833dba318686e01a4c7ff721327e08b033 (diff)
Make sure we initialize a TVB. Fixes bug 2329.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24543 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-x509sat.c')
-rw-r--r--epan/dissectors/packet-x509sat.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/epan/dissectors/packet-x509sat.c b/epan/dissectors/packet-x509sat.c
index e0d595eeae..3eaaa9cb4d 100644
--- a/epan/dissectors/packet-x509sat.c
+++ b/epan/dissectors/packet-x509sat.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-x509sat.c */
-/* ../../tools/asn2wrs.py -b -e -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
+/* ../../tools/asn2wrs.py -b -e -p x509sat -c ./x509sat.cnf -s ./packet-x509sat-template -D . SelectedAttributeTypes.asn */
/* Input file: packet-x509sat-template.c */
@@ -500,7 +500,7 @@ static const value_string x509sat_T_subset_vals[] = {
static int
dissect_x509sat_T_subset(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -627,7 +627,7 @@ static const value_string x509sat_PreferredDeliveryMethod_item_vals[] = {
static int
dissect_x509sat_PreferredDeliveryMethod_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -915,7 +915,7 @@ dissect_x509sat_T_absolute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_x509sat_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1322,7 +1322,7 @@ dissect_x509sat_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
int
dissect_x509sat_TimeZone(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1440,7 +1440,7 @@ dissect_x509sat_BitString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
static int
dissect_x509sat_Integer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ NULL);
return offset;
}
@@ -1512,7 +1512,7 @@ dissect_x509sat_SyntaxIA5String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
static int
dissect_x509sat_SyntaxBMPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 298 "x509sat.cnf"
- tvbuff_t *wide_tvb;
+ tvbuff_t *wide_tvb = NULL;
char *string;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_BMPString,
@@ -1520,6 +1520,9 @@ dissect_x509sat_SyntaxBMPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
&wide_tvb);
#line 303 "x509sat.cnf"
+ if (! wide_tvb) {
+ return offset;
+ }
string = tvb_get_ephemeral_faked_unicode (wide_tvb, 0, tvb_length(wide_tvb) / 2, FALSE);
proto_item_append_text(actx->created_item, " %s", string);