소스 검색

Safe guarding eval code result from null values

Sebastien Ros 12 년 전
부모
커밋
ecea61f082
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Jint/Native/Function/EvalFunctionInstance.cs

+ 1 - 1
Jint/Native/Function/EvalFunctionInstance.cs

@@ -21,7 +21,7 @@ namespace Jint.Native.Function
 
             var parser = new JavascriptParser();
             var program = parser.Parse(code);
-            return _engine.ExecuteStatement(program).Value;
+            return _engine.ExecuteStatement(program).Value ?? Undefined.Instance;
         }
     }
 }