diff options
author | Dwight <dmerriman@gmail.com> | 2009-09-21 10:40:25 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-26 10:34:37 -0400 |
commit | 6b748b2ccd5db6e60aaf1e3ede72a782ffa55dcd (patch) | |
tree | 04ca4a4b3ca8d8b913e7f897d7e6fda636e466f7 | |
parent | e316c78bc3dcbd0729454b81eff4e172579c1bc0 (diff) | |
download | mongo-6b748b2ccd5db6e60aaf1e3ede72a782ffa55dcd.tar.gz |
validate skip() value on a query
-rw-r--r-- | db/query.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/query.cpp b/db/query.cpp index baa82c7102f..23f42683505 100644 --- a/db/query.cpp +++ b/db/query.cpp @@ -1121,7 +1121,9 @@ namespace mongo { saveClientCursor_(), findingStart_( (queryOptions & Option_OplogReplay) != 0 ), findingStartCursor_() - {} + { + uassert("bad skip value in query", ntoskip >= 0); + } virtual void init() { b_.skip( sizeof( QueryResult ) ); |