Paolo Abeni:

The attached patch should fix bug 742.
The issue is (at least, I think so...) in the packet-x509af dissector
A null pointer is passes as parameter of a " %s " format string.


svn path=/trunk/; revision=17317
This commit is contained in:
Jörg Mayer 2006-02-16 11:47:16 +00:00
parent b13f6dcbd3
commit 35e1e1abe4
2 changed files with 7 additions and 3 deletions

View File

@ -110,8 +110,10 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
#.FN_BODY SubjectName
const char* str;
%(DEFAULT_BODY)s
proto_item_append_text(proto_item_get_parent(tree), " (%%s)", x509if_get_last_dn());
str = x509if_get_last_dn();
proto_item_append_text(proto_item_get_parent(tree), " (%%s)", str?str:"");
#.END

View File

@ -427,12 +427,14 @@ static int
dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
#line 112 "x509af.cnf"
const char* str;
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
SubjectName_choice, hf_index, ett_x509af_SubjectName,
NULL);
proto_item_append_text(proto_item_get_parent(tree), " (%s)", x509if_get_last_dn());
str = x509if_get_last_dn();
proto_item_append_text(proto_item_get_parent(tree), " (%s)", str?str:"");
@ -1419,7 +1421,7 @@ void proto_register_x509af(void) {
"AttributeCertificateAssertion/attType", HFILL }},
{ &hf_x509af_attType_item,
{ "Item", "x509af.attType_item",
FT_STRING, BASE_NONE, NULL, 0,
FT_OID, BASE_NONE, NULL, 0,
"AttributeCertificateAssertion/attType/_item", HFILL }},
{ &hf_x509af_p,
{ "p", "x509af.p",