Browse Source

Merge pull request #9725 from jakesmith/hpcc-17251

HPCC-17251 Fix invalid use of StringBuffer string in dali connection

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 8 years ago
parent
commit
3670d33e6e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      dali/base/dasds.cpp

+ 3 - 2
dali/base/dasds.cpp

@@ -7310,9 +7310,10 @@ CServerConnection *CCovenSDSManager::createConnectionInstance(CRemoteTreeBase *r
                 unsigned l = _deltaPath.length();
                 const char *t = queryHead(headPath.str(), _deltaPath);
                 assertex(l != _deltaPath.length());
-                headPath.clear();
                 if (t)
-                    headPath.append(t);
+                    headPath.remove(0, _deltaPath.length());
+                else
+                    headPath.clear();
                 if (++s>=connection->queryPTreePath().ordinality())
                     break;
             }