diff --git a/tools/import.cpp b/tools/import.cpp index de20fbb295e..0e12757d0be 100644 --- a/tools/import.cpp +++ b/tools/import.cpp @@ -21,6 +21,7 @@ #include "db/json.h" #include "tool.h" +#include "../util/text.h" #include #include @@ -53,6 +54,8 @@ class Import : public Tool { } BSONObj parseLine( char * line ){ + uassert(13289, "Invalid UTF8 character detected", isValidUTF8(line)); + if ( _type == JSON ){ char * end = ( line + strlen( line ) ) - 1; while ( isspace(*end) ){