diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-10-19 12:07:50 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-10-19 11:28:19 +0000 |
commit | e8a37694cebe030252f028e926ee5d4fd966a812 (patch) | |
tree | 0880738cd02e8e7e1ad076497157db631dd23eec /asn1 | |
parent | 1c322a121431dfa27bcba5dcfc5915d9720a882f (diff) |
X509AF: protect against a comparison with a NULL algorithm_id string
Bug: 11611
Change-Id: Ide8a26f74c99405b53acf394041ddf4a599da90a
Reviewed-on: https://code.wireshark.org/review/11143
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/x509af/x509af.cnf | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf index 8c299cef6d..5058676a27 100644 --- a/asn1/x509af/x509af.cnf +++ b/asn1/x509af/x509af.cnf @@ -96,15 +96,15 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate /* See RFC 3279 for possible subjectPublicKey values given an Algorithm ID. * The contents of subjectPublicKey are always explicitly tagged. */ - if (!strcmp(algorithm_id, "1.2.840.113549.1.1.1")) { /* id-rsa */ + if (!g_strcmp0(algorithm_id, "1.2.840.113549.1.1.1")) { /* id-rsa */ offset += dissect_pkcs1_RSAPublicKey(FALSE, bs_tvb, 0, actx, tree, hf_index); # TODO: PKCS#1 only defines RSA; DH and DSA are from PKIX1Algorithms2008 -# } else if (!strcmp(algorithm_id, "1.2.840.10040.4.1")) { /* id-dsa */ +# } else if (!g_strcmp0(algorithm_id, "1.2.840.10040.4.1")) { /* id-dsa */ # subtree = proto_item_add_subtree(actx->created_item, ett_subjectpublickey); # offset += dissect_DSAPublicKey(FALSE, bs_tvb, 0, actx, subtree, hf_dsa_y); # -# } else if (!strcmp(algorithm_id, "1.2.840.10046.2.1")) { /* dhpublicnumber */ +# } else if (!g_strcmp0(algorithm_id, "1.2.840.10046.2.1")) { /* dhpublicnumber */ # subtree = proto_item_add_subtree(actx->created_item, ett_subjectpublickey); # offset += dissect_DHPublicKey(FALSE, bs_tvb, 0, actx, subtree, hf_dh_y); # |