diff -urN wireshark-1.2.15/asn1/x509if/packet-x509if-template.c wireshark-1.2.16/asn1/x509if/packet-x509if-template.c
--- wireshark-1.2.15/asn1/x509if/packet-x509if-template.c	2011-03-01 09:03:16.000000000 -0800
+++ wireshark-1.2.16/asn1/x509if/packet-x509if-template.c	2011-04-15 10:31:50.000000000 -0700
@@ -2,7 +2,7 @@
  * Routines for X.509 Information Framework packet dissection
  *  Ronnie Sahlberg 2004
  *
- * $Id: packet-x509if-template.c 27391 2009-02-07 15:17:54Z wmeier $
+ * $Id: packet-x509if-template.c 36613 2011-04-12 21:21:40Z gerald $
  *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald@wireshark.org>
@@ -40,6 +40,7 @@
 #include "packet-x509if.h"
 #include "packet-x509sat.h"
 #include <epan/strutil.h>
+#include <epan/dissectors/packet-frame.h>
 
 #define PNAME  "X.509 Information Framework"
 #define PSNAME "X509IF"
@@ -54,13 +55,12 @@
 /* Initialize the subtree pointers */
 #include "packet-x509if-ett.c"
 
-static const char *object_identifier_id;
+static const char *object_identifier_id = NULL;
 static proto_tree *top_of_dn = NULL;
 static proto_tree *top_of_rdn = NULL;
 
 static gboolean rdn_one_value = FALSE; /* have we seen one value in an RDN yet */
 static gboolean dn_one_rdn = FALSE; /* have we seen one RDN in a DN yet */
-static gboolean doing_dn = TRUE;
 static gboolean doing_attr = FALSE;
 
 #define MAX_RDN_STR_LEN   64
@@ -75,6 +75,22 @@
 #define MAX_AVA_STR_LEN   64
 static char *last_ava = NULL;
 
+static void
+x509if_frame_end(void)
+{
+  object_identifier_id = NULL;
+  top_of_dn = NULL;
+  top_of_rdn = NULL;
+
+  rdn_one_value = FALSE;
+  dn_one_rdn = FALSE;
+  doing_attr = FALSE;
+
+  last_dn = NULL;
+  last_rdn = NULL;
+  last_ava = NULL;
+}
+
 #include "packet-x509if-fn.c"
 
 const char * x509if_get_last_dn(void)
diff -urN wireshark-1.2.15/asn1/x509if/x509if.cnf wireshark-1.2.16/asn1/x509if/x509if.cnf
--- wireshark-1.2.15/asn1/x509if/x509if.cnf	2011-03-01 09:03:16.000000000 -0800
+++ wireshark-1.2.16/asn1/x509if/x509if.cnf	2011-04-15 10:31:50.000000000 -0700
@@ -1,7 +1,7 @@
 # x509if.cnf
 # X509IF conformation file
 
-# $Id: x509if.cnf 29662 2009-09-01 22:36:30Z gerald $
+# $Id: x509if.cnf 36613 2011-04-12 21:21:40Z gerald $
 
 #.IMPORT ../x509sat/x509sat-exp.cnf
 
@@ -197,7 +197,7 @@
     name = oid_resolved_from_string(object_identifier_id);
     if(!name) name = object_identifier_id;    
 
-    if(doing_dn) { /* append it to the RDN */
+    if(last_rdn) { /* append it to the RDN */
       g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
       g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
 
@@ -213,6 +213,7 @@
     if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) {
       /* we have a format */
       last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0';
+      register_frame_end_routine (x509if_frame_end);
 
       g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt);
 
@@ -245,7 +246,7 @@
     /* it was a string - format it */
     value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb));
 
-    if(doing_dn) {
+    if(last_rdn) {
       g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
 
       /* append it to the tree*/
@@ -255,6 +256,10 @@
     if((fmt = val_to_str(ava_hf_index, fmt_vals, "")) && *fmt) {
       /* we have a format */
 
+      if (!last_ava) {
+        last_ava = ep_alloc(MAX_AVA_STR_LEN);
+      }
+
     if(!(name = oid_resolved_from_string(object_identifier_id)))
       name = object_identifier_id;
     g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s %%s", name, fmt, value);
@@ -330,7 +335,7 @@
   rdn_one_value = FALSE;
   top_of_rdn = tree;
   last_rdn = ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0';
-  doing_dn = TRUE;
+  register_frame_end_routine (x509if_frame_end);
 
   %(DEFAULT_BODY)s
 
@@ -349,7 +354,6 @@
     }
   }
 
-  doing_dn = FALSE;
   last_rdn = NULL; /* it will get freed when the next packet is dissected */
 
 #.FN_BODY RelativeDistinguishedName/_item
@@ -358,7 +362,7 @@
     top_of_rdn = tree;
   } else {
 
-   if(doing_dn)  
+   if(last_rdn)  
      /* this is an additional value - delimit */
      g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
   }
@@ -373,6 +377,8 @@
   dn_one_rdn = FALSE; /* reset */
   last_dn = ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0';
   top_of_dn = NULL;
+  register_frame_end_routine (x509if_frame_end);
+
 
   %(DEFAULT_BODY)s
 
@@ -402,6 +408,7 @@
 
 	ava_hf_index = hf_index;
 	last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0';
+	register_frame_end_routine (x509if_frame_end);
 
 	%(DEFAULT_BODY)s
 
@@ -409,10 +416,9 @@
 
 #.FN_BODY Attribute
 	doing_attr = TRUE;
+	register_frame_end_routine (x509if_frame_end);
 
 	%(DEFAULT_BODY)s
-
-	doing_attr = FALSE;
 #.END
 
 
diff -urN wireshark-1.2.15/epan/dissectors/packet-x509if.c wireshark-1.2.16/epan/dissectors/packet-x509if.c
--- wireshark-1.2.15/epan/dissectors/packet-x509if.c	2011-03-01 09:05:39.000000000 -0800
+++ wireshark-1.2.16/epan/dissectors/packet-x509if.c	2011-04-15 10:33:05.000000000 -0700
@@ -10,7 +10,7 @@
  * Routines for X.509 Information Framework packet dissection
  *  Ronnie Sahlberg 2004
  *
- * $Id: packet-x509if.c 31280 2009-12-16 00:43:19Z gerald $
+ * $Id: packet-x509if.c 36613 2011-04-12 21:21:40Z gerald $
  *
  * Wireshark - Network traffic analyzer
  * By Gerald Combs <gerald@wireshark.org>
@@ -48,6 +48,7 @@
 #include "packet-x509if.h"
 #include "packet-x509sat.h"
 #include <epan/strutil.h>
+#include <epan/dissectors/packet-frame.h>
 
 #define PNAME  "X.509 Information Framework"
 #define PSNAME "X509IF"
@@ -217,7 +218,7 @@
 static int hf_x509if_AllowedSubset_wholeSubtree = -1;
 
 /*--- End of included file: packet-x509if-hf.c ---*/
-#line 53 "packet-x509if-template.c"
+#line 54 "packet-x509if-template.c"
 
 /* Initialize the subtree pointers */
 
@@ -298,15 +299,14 @@
 static gint ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString = -1;
 
 /*--- End of included file: packet-x509if-ett.c ---*/
-#line 56 "packet-x509if-template.c"
+#line 57 "packet-x509if-template.c"
 
-static const char *object_identifier_id;
+static const char *object_identifier_id = NULL;
 static proto_tree *top_of_dn = NULL;
 static proto_tree *top_of_rdn = NULL;
 
 static gboolean rdn_one_value = FALSE; /* have we seen one value in an RDN yet */
 static gboolean dn_one_rdn = FALSE; /* have we seen one RDN in a DN yet */
-static gboolean doing_dn = TRUE;
 static gboolean doing_attr = FALSE;
 
 #define MAX_RDN_STR_LEN   64
@@ -321,6 +321,22 @@
 #define MAX_AVA_STR_LEN   64
 static char *last_ava = NULL;
 
+static void
+x509if_frame_end(void)
+{
+  object_identifier_id = NULL;
+  top_of_dn = NULL;
+  top_of_rdn = NULL;
+
+  rdn_one_value = FALSE;
+  dn_one_rdn = FALSE;
+  doing_attr = FALSE;
+
+  last_dn = NULL;
+  last_rdn = NULL;
+  last_ava = NULL;
+}
+
 
 /*--- Included file: packet-x509if-fn.c ---*/
 #line 1 "packet-x509if-fn.c"
@@ -352,7 +368,7 @@
 
 static int
 dissect_x509if_T_values_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_) {
-#line 310 "x509if.cnf"
+#line 315 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -377,7 +393,7 @@
 
 static int
 dissect_x509if_T_value(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 280 "x509if.cnf"
+#line 285 "x509if.cnf"
   offset=call_ber_oid_callback("unknown", tvb, offset, actx->pinfo, tree);
 
 
@@ -398,7 +414,7 @@
 
 static int
 dissect_x509if_T_contextValues_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_) {
-#line 292 "x509if.cnf"
+#line 297 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -495,15 +511,14 @@
 
 int
 dissect_x509if_Attribute(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 411 "x509if.cnf"
+#line 418 "x509if.cnf"
 	doing_attr = TRUE;
+	register_frame_end_routine (x509if_frame_end);
 
 	  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                    Attribute_sequence, hf_index, ett_x509if_Attribute);
 
 
-	doing_attr = FALSE;
-
 
   return offset;
 }
@@ -521,7 +536,7 @@
 
 int
 dissect_x509if_AttributeValue(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 "x509if.cnf"
+#line 303 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -542,7 +557,7 @@
 
 static int
 dissect_x509if_T_assertion(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 304 "x509if.cnf"
+#line 309 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -653,10 +668,11 @@
 
 int
 dissect_x509if_AttributeValueAssertion(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 402 "x509if.cnf"
+#line 408 "x509if.cnf"
 
 	ava_hf_index = hf_index;
 	last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0';
+	register_frame_end_routine (x509if_frame_end);
 
 	  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                    AttributeValueAssertion_sequence, hf_index, ett_x509if_AttributeValueAssertion);
@@ -722,7 +738,7 @@
     name = oid_resolved_from_string(object_identifier_id);
     if(!name) name = object_identifier_id;    
 
-    if(doing_dn) { /* append it to the RDN */
+    if(last_rdn) { /* append it to the RDN */
       g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
       g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
 
@@ -738,6 +754,7 @@
     if((fmt = val_to_str(hf_index, fmt_vals, "")) && *fmt) {
       /* we have a format */
       last_ava = ep_alloc(MAX_AVA_STR_LEN); *last_ava = '\0';
+      register_frame_end_routine (x509if_frame_end);
 
       g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s", name, fmt);
 
@@ -755,7 +772,7 @@
 
 static int
 dissect_x509if_T_atadv_value(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 225 "x509if.cnf"
+#line 226 "x509if.cnf"
   int old_offset = offset;
   tvbuff_t	*out_tvb;
   char  	*value = NULL;
@@ -779,7 +796,7 @@
     /* it was a string - format it */
     value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb));
 
-    if(doing_dn) {
+    if(last_rdn) {
       g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
 
       /* append it to the tree*/
@@ -789,6 +806,10 @@
     if((fmt = val_to_str(ava_hf_index, fmt_vals, "")) && *fmt) {
       /* we have a format */
 
+      if (!last_ava) {
+        last_ava = ep_alloc(MAX_AVA_STR_LEN);
+      }
+
     if(!(name = oid_resolved_from_string(object_identifier_id)))
       name = object_identifier_id;
     g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value);
@@ -807,7 +828,7 @@
 
 static int
 dissect_x509if_T_distingAttrValue(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 325 "x509if.cnf"
+#line 330 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -864,13 +885,13 @@
 
 static int
 dissect_x509if_RelativeDistinguishedName_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_) {
-#line 356 "x509if.cnf"
+#line 360 "x509if.cnf"
 
   if(!rdn_one_value) {
     top_of_rdn = tree;
   } else {
 
-   if(doing_dn)  
+   if(last_rdn)  
      /* this is an additional value - delimit */
      g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
   }
@@ -892,13 +913,13 @@
 
 int
 dissect_x509if_RelativeDistinguishedName(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 328 "x509if.cnf"
+#line 333 "x509if.cnf"
   char *temp_dn;
 
   rdn_one_value = FALSE;
   top_of_rdn = tree;
   last_rdn = ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0';
-  doing_dn = TRUE;
+  register_frame_end_routine (x509if_frame_end);
 
     offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
                                  RelativeDistinguishedName_set_of, hf_index, ett_x509if_RelativeDistinguishedName);
@@ -919,7 +940,6 @@
     }
   }
 
-  doing_dn = FALSE;
   last_rdn = NULL; /* it will get freed when the next packet is dissected */
 
 
@@ -931,7 +951,7 @@
 
 static int
 dissect_x509if_RDNSequence_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_) {
-#line 391 "x509if.cnf"
+#line 397 "x509if.cnf"
 
   if(!dn_one_rdn)  {
     /* this is the first element - record the top */
@@ -955,12 +975,14 @@
 
 int
 dissect_x509if_RDNSequence(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 371 "x509if.cnf"
+#line 375 "x509if.cnf"
   const char *fmt; 
 
   dn_one_rdn = FALSE; /* reset */
   last_dn = ep_alloc(MAX_DN_STR_LEN); *last_dn = '\0';
   top_of_dn = NULL;
+  register_frame_end_routine (x509if_frame_end);
+
 
     offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
                                       RDNSequence_sequence_of, hf_index, ett_x509if_RDNSequence);
@@ -1365,7 +1387,7 @@
 
 static int
 dissect_x509if_T_ra_selectedValues_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_) {
-#line 271 "x509if.cnf"
+#line 276 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -1399,7 +1421,7 @@
 
 static int
 dissect_x509if_T_ra_values_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_) {
-#line 277 "x509if.cnf"
+#line 282 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -1461,7 +1483,7 @@
 
 static int
 dissect_x509if_T_contextValue_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_) {
-#line 316 "x509if.cnf"
+#line 321 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -1562,7 +1584,7 @@
 
 static int
 dissect_x509if_T_restrictionValue(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 322 "x509if.cnf"
+#line 327 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -1683,7 +1705,7 @@
 
 static int
 dissect_x509if_T_selectedValues_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_) {
-#line 286 "x509if.cnf"
+#line 291 "x509if.cnf"
   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
@@ -2083,7 +2105,7 @@
 
 
 /*--- End of included file: packet-x509if-fn.c ---*/
-#line 79 "packet-x509if-template.c"
+#line 95 "packet-x509if-template.c"
 
 const char * x509if_get_last_dn(void)
 {
@@ -2749,7 +2771,7 @@
         NULL, HFILL }},
 
 /*--- End of included file: packet-x509if-hfarr.c ---*/
-#line 124 "packet-x509if-template.c"
+#line 140 "packet-x509if-template.c"
   };
 
   /* List of subtrees */
@@ -2832,7 +2854,7 @@
     &ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString,
 
 /*--- End of included file: packet-x509if-ettarr.c ---*/
-#line 129 "packet-x509if-template.c"
+#line 145 "packet-x509if-template.c"
   };
 
   /* Register protocol */
@@ -2888,6 +2910,6 @@
 
 
 /*--- End of included file: packet-x509if-dis-tab.c ---*/
-#line 148 "packet-x509if-template.c"
+#line 164 "packet-x509if-template.c"
 }
 
