浏览代码

HPCC-12762 Multi filenames using wildcards allocate large amounts of memory

Due to a bug in the filename resolution code it tries to resize a string to
around 4gb or so. If it succeeds (as it will on may 64bit systems) then there
is no observable symptom (and the memory will be released later). But on
smaller systems this will result in realloc failed error messages.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 年之前
父节点
当前提交
a6bc5f9c6d
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      dali/base/dautils.cpp

+ 0 - 3
dali/base/dautils.cpp

@@ -138,8 +138,6 @@ public:
             return;
         StringArray lfnExpanded;
         StringBuffer tmp;
-        const char * s = prefix.str();
-        const char *start = strchr(s,'{');
         for (unsigned idx=0; idx < dlfns.size(); idx++)
         {
             const char *suffix = dlfns.at(idx).get();
@@ -152,7 +150,6 @@ public:
                     tmp.append(suffix);
                 tmp.clip().toLowerCase();
                 Owned<IDFAttributesIterator> iter=queryDistributedFileDirectory().getDFAttributesIterator(tmp.str(),_udesc,false,true,NULL);
-                prefix.setLength(start-s);
                 ForEach(*iter)
                 {
                     IPropertyTree &attr = iter->query();