diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-03-13 18:47:46 -0400 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-03-14 15:08:57 -0400 |
commit | 4762f668cb23027de1201b5a30f32eac9f35ab60 (patch) | |
tree | 82aece745864bafc608050bbc15034852b6467bf /jstests/core/apply_ops_without_ns.js | |
parent | 6899541295ac9b7f75f7c68a39cb533c6a17be28 (diff) | |
download | mongo-4762f668cb23027de1201b5a30f32eac9f35ab60.tar.gz |
SERVER-33854 Avoid accessing invalid memory in applyOps
Diffstat (limited to 'jstests/core/apply_ops_without_ns.js')
-rw-r--r-- | jstests/core/apply_ops_without_ns.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/core/apply_ops_without_ns.js b/jstests/core/apply_ops_without_ns.js new file mode 100644 index 00000000000..512c599595c --- /dev/null +++ b/jstests/core/apply_ops_without_ns.js @@ -0,0 +1,8 @@ +(function() { + 'use strict'; + + // SERVER-33854: This should fail and not cause any invalid memory access. + assert.commandFailed(db.adminCommand({ + applyOps: [{'op': 'c', 'ns': 'admin.$cmd', 'o': {applyOps: [{'op': 'i', 'o': {x: 1}}]}}] + })); +})(); |