[xdebug-dev] xdebug xdebug/xdebug_var.c - Fixed bug #168: Xdebug's DBGp crashes on an eval command where the

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Tue, 21 Feb 2006 22:26:58 +0100

Date: Tue Feb 21 22:26:58 CET 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Fixed bug #168: Xdebug's DBGp crashes on an eval command where the
  result is an array.

Modified files:
           xdebug/xdebug_var.c (version: 1.67)

[FILE: /xdebug/xdebug_var.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- xdebug/xdebug_var.c:1.66 Mon Feb 20 13:57:21 2006 GMT
+++ xdebug/xdebug_var.c Tue Feb 21 20:26:58 2006 GMT
@@ -408,17 +408,21 @@
                 options->runtime[level].current_element_nr < options->runtime[level].end_element_nr)
         {
                 node = xdebug_xml_node_init("property");
-
+
                 if (hash_key->nKeyLength != 0) {
                         name = xdstrdup(hash_key->arKey);
- if (parent_name[0] != '$') {
+ if (!parent_name) {
+ full_name = NULL;
+ } else if (parent_name[0] != '$') {
                                 full_name = xdebug_sprintf("$%s['%s']", parent_name, name);
                         } else {
                                 full_name = xdebug_sprintf("%s['%s']", parent_name, name);
                         }
                 } else {
                         name = xdebug_sprintf("%ld", hash_key->h);
- if (parent_name[0] != '$') {
+ if (!parent_name) {
+ full_name = NULL;
+ } else if (parent_name[0] != '$') {
                                 full_name = xdebug_sprintf("$%s[%s]", parent_name, name);
                         } else {
                                 full_name = xdebug_sprintf("%s[%s]", parent_name, name);
@@ -426,7 +430,9 @@
                 }
 
                 xdebug_xml_add_attribute_ex(node, "name", name, 0, 1);
- xdebug_xml_add_attribute_ex(node, "fullname", full_name, 0, 1);
+ if (full_name) {
+ xdebug_xml_add_attribute_ex(node, "fullname", full_name, 0, 1);
+ }
                 xdebug_xml_add_attribute_ex(node, "address", xdebug_sprintf("%ld", (long) *zv), 0, 1);
 
                 xdebug_xml_add_child(parent, node);
Received on Tue Feb 21 2006 - 22:27:01 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST