diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-10-27 11:44:22 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-27 11:44:22 -0400 |
commit | 91e18dc16baf777cd3014b9cd8833c820e9ee3fc (patch) | |
tree | 2fe6514579c7af8cc2716d26de79bcbdef8e9b8a /tools/restore.cpp | |
parent | 7515e47dacebf65c3d3adcd7126e76c7b5b66495 (diff) | |
download | mongo-91e18dc16baf777cd3014b9cd8833c820e9ee3fc.tar.gz |
tool cleaning
Diffstat (limited to 'tools/restore.cpp')
-rw-r--r-- | tools/restore.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/restore.cpp b/tools/restore.cpp index d87f51679b9..82dd32743a0 100644 --- a/tools/restore.cpp +++ b/tools/restore.cpp @@ -148,7 +148,10 @@ public: while ( read < fileLength ) { file.read( buf , 4 ); int size = ((int*)buf)[0]; - assert( size < BUF_SIZE ); + if ( size >= BUF_SIZE ){ + cerr << "got an object of size: " << size << " terminating..." << endl; + } + uassert( "invalid object size" , size < BUF_SIZE ); file.read( buf + 4 , size - 4 ); |