diff options
author | Evan Huus <eapache@gmail.com> | 2013-06-19 23:08:58 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-06-19 23:08:58 +0000 |
commit | 8b0f1addd990ae1b6616dbb5a21e530942461154 (patch) | |
tree | e72f102e0cec19ee49b5729f8dcfa62afa3a931d /asn1/x509if | |
parent | e6e7c1181bd33a94de00e137685f39520bd858dc (diff) | |
download | wireshark-8b0f1addd990ae1b6616dbb5a21e530942461154.tar.gz |
Apparently one of our major global headers must include emem.h, because I just
found a bunch more asn1 dissectors using emem without ever directly including
the header. Convert those to wmem as well, which involves add a number of
#include directives since dissectors do *not* automatically pull in the wmem
headers.
svn path=/trunk/; revision=50066
Diffstat (limited to 'asn1/x509if')
-rw-r--r-- | asn1/x509if/packet-x509if-template.c | 1 | ||||
-rw-r--r-- | asn1/x509if/x509if.cnf | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index c88da2d820..47563d90f8 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -29,6 +29,7 @@ #include <epan/packet.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <epan/wmem/wmem.h> #include "packet-ber.h" #include "packet-dap.h" diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index b9c7b9e5d9..b730e2a2e5 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -212,7 +212,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) { /* we have a format */ - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt); @@ -257,7 +257,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* we have a format */ if (!last_ava) { - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); } if(!(name = oid_resolved_from_string(object_identifier_id))) @@ -334,7 +334,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" rdn_one_value = FALSE; top_of_rdn = tree; - last_rdn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0'; + last_rdn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_rdn = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s @@ -345,7 +345,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" /* now append this to the DN */ if (last_dn) { if(*last_dn) { - temp_dn = (char *)ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ + temp_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */ g_snprintf(temp_dn, MAX_DN_STR_LEN, "%%s,%%s", last_rdn, last_dn); last_dn[0] = '\0'; g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN); @@ -375,7 +375,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" const char *fmt; dn_one_rdn = FALSE; /* reset */ - last_dn = (char *)ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0'; + last_dn = (char *)wmem_alloc(wmem_packet_scope(), MAX_DN_STR_LEN); *last_dn = '\0'; top_of_dn = NULL; register_frame_end_routine (actx->pinfo, x509if_frame_end); @@ -406,7 +406,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" #.FN_BODY AttributeValueAssertion ava_hf_index = hf_index; - last_ava = (char *)ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0'; + last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); %(DEFAULT_BODY)s |