there's nothing like a MAX_OID_STR_LEN... get rid of a potential stack BO
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 25 Aug 2007 14:48:48 +0000 (14:48 +0000)
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 25 Aug 2007 14:48:48 +0000 (14:48 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22657 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/x411/packet-x411-template.c
epan/dissectors/packet-x411.c

index 3adbe6b8ae193bfc7eb9c36b56618f9d26cbc17b..75f3eaf8356339b939a2d4d0263ffcc57f102619 100644 (file)
@@ -94,9 +94,9 @@ static int
 call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
 {
   const char *name = NULL;
-  char extension_oid[MAX_OID_STR_LEN];
+  char* extension_oid;
 
-  sprintf(extension_oid, "%s.%d", base_oid, extension_id);     
+  extension_oid = ep_strdup_printf("%s.%d", base_oid, extension_id);
 
   name = get_oid_str_name(extension_oid);
   proto_item_append_text(tree, " (%s)", name ? name : extension_oid); 
index c1b4209286eb90b32ad4c4bf818da95369e395c2..ab6c2b7ab51eb2484f2806bad2b3fa38d24b6c32 100644 (file)
@@ -7803,9 +7803,9 @@ static int
 call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
 {
   const char *name = NULL;
-  char extension_oid[MAX_OID_STR_LEN];
+  char* extension_oid;
 
-  sprintf(extension_oid, "%s.%d", base_oid, extension_id);     
+  extension_oid = ep_strdup_printf("%s.%d", base_oid, extension_id);
 
   name = get_oid_str_name(extension_oid);
   proto_item_append_text(tree, " (%s)", name ? name : extension_oid);