mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1242772 - Baldr: fix unterminated string literal (r=bbouvier)
This commit is contained in:
parent
78c2d83bb7
commit
3416300355
@ -408,9 +408,11 @@ class WasmTokenStream
|
||||
const char16_t* begin = cur_++;
|
||||
switch (*begin) {
|
||||
case '"':
|
||||
while (cur_ != end_ && *cur_ != '"')
|
||||
cur_++;
|
||||
return WasmToken(WasmToken::Text, begin, ++cur_);
|
||||
do {
|
||||
if (cur_ == end_)
|
||||
return fail(begin);
|
||||
} while (*cur_++ != '"');
|
||||
return WasmToken(WasmToken::Text, begin, cur_);
|
||||
|
||||
case '$':
|
||||
while (cur_ != end_ && IsNameAfterDollar(*cur_))
|
||||
|
@ -5,11 +5,12 @@ if (!this.wasmEval)
|
||||
|
||||
var parsingError = /parsing wasm text at/;
|
||||
|
||||
assertErrorMessage(() => wasmEvalText(""), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText("("), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText("(m"), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText("(module"), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText("(moduler"), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText(''), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText('('), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText('(m'), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText('(module'), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText('(moduler'), Error, parsingError);
|
||||
assertErrorMessage(() => wasmEvalText('(module (func) (export "a'), Error, parsingError);
|
||||
|
||||
// Note: the s-expression text format is temporary, this file is mostly just to
|
||||
// hold basic error smoke tests.
|
||||
|
Loading…
Reference in New Issue
Block a user