瀏覽代碼

HPCC-8924 Prevent simple recursive computerTypes causing stack faults

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 12 年之前
父節點
當前提交
875eb4526e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      common/environment/environment.cpp

+ 2 - 2
common/environment/environment.cpp

@@ -789,7 +789,7 @@ public:
             return os;
 
         Owned<IConstComputerTypeInfo> type = env->getComputerType(root->queryProp("@computerType"));
-        if (type)
+        if (type && (type.get() != this))
             return type->getOS();
         return MachineOsUnknown;
     }
@@ -800,7 +800,7 @@ public:
             return atoi(v);
 
         Owned<IConstComputerTypeInfo> type = env->getComputerType(root->queryProp("@computerType"));
-        if (type)
+        if (type && (type.get() != this))
             return type->getNicSpeedMbitSec();
         return 0;
     }