diff --git a/src/jsrs_parser.cc b/src/jsrs_parser.cc index 5dc93b3..7273099 100644 --- a/src/jsrs_parser.cc +++ b/src/jsrs_parser.cc @@ -334,6 +334,10 @@ MaybeLocal ParseNumber(Isolate* isolate, } else { result = ParseIntegerNumber(isolate, number_start, end, size, base, negate_result); + if (*size == 0) { + THROW_EXCEPTION(SyntaxError, "Empty number value"); + return MaybeLocal(); + } } *size += number_start - begin; return result;