SERVER-3425: Server crash when passed invalid JS in CodeWScope object

This commit is contained in:
agirbal
2011-10-04 21:13:56 -07:00
parent a9614810d9
commit f895b46f9e

View File

@@ -661,6 +661,8 @@ namespace mongo {
}
case CodeWScope: {
JSFunction * func = compileFunction( e.codeWScopeCode() );
if ( !func )
return JSVAL_NULL;
BSONObj extraScope = e.codeWScopeObject();
if ( ! extraScope.isEmpty() ) {