Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-25527

Potential crash if PTree is removed from an array, the re-added as an element

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.12.38
    • Dali, JLib
    • None

    Description

      Example code:

                  Owned<IPropertyTree> t = createPTree();
                  t->addPropInt("a", 1);
                  t->addPropInt("a", 2);
                  Owned<IPropertyTree> a = t->getPropTree("a[2]");
                  while (t->removeProp("a"));
                  IPropertyTree *b = t->addPropTree("b", a.getClear());
                  PROGLOG("Is array = %s", boolToStr(b->isArray(nullptr))); // <--- CRASH
      

      Attachments

        Issue Links

          Activity

            People

              jakesmith Jake Smith
              jakesmith Jake Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: