diff options
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r-- | src/wast-parser.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc index e443f3b2..4a7ad526 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -926,7 +926,8 @@ Result WastParser::ParseNat(uint64_t* out_nat) { Token token = Consume(); string_view sv = token.literal().text; - if (Failed(ParseUint64(sv.begin(), sv.end(), out_nat))) { + if (Failed(ParseUint64(sv.begin(), sv.end(), out_nat)) || + *out_nat > 0xffffffffu) { Error(token.loc, "invalid int \"" PRIstringview "\"", WABT_PRINTF_STRING_VIEW_ARG(sv)); } |