diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-s-parser.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 3fd977f09..fcf0e0dd8 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -847,7 +847,9 @@ private: if (str[0] == 'a') { ret->align = atoi(eq); } else if (str[0] == 'o') { - ret->offset = atol(eq); // XXX https://github.com/WebAssembly/spec/issues/161 + uint64_t offset = atol(eq); + if (offset > 0xffffffff) onError(); + ret->offset = offset; } else onError(); i++; } |