소스 검색

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;
     }