Protect against json integer overflow

Closes #75
This commit is contained in:
Erick Tryzelaar
2015-05-18 22:39:46 -07:00
parent adae2bd3c5
commit e6776ffc37
2 changed files with 14 additions and 4 deletions
+1
View File
@@ -708,6 +708,7 @@ fn test_parse_number_errors() {
("1e", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 2)),
("1e+", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 3)),
("1a", Error::SyntaxError(ErrorCode::TrailingCharacters, 1, 2)),
("777777777777777777777777777", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 20)),
]);
}