HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12793a7
)
wasm: check for invalid string in read_form
author
Joel Martin
<github@martintribe.org>
Wed, 31 Jul 2019 04:10:44 +0000
(23:10 -0500)
committer
Joel Martin
<github@martintribe.org>
Wed, 31 Jul 2019 04:14:16 +0000
(23:14 -0500)
wasm/reader.wam
patch
|
blob
|
blame
|
history
diff --git
a/wasm/reader.wam
b/wasm/reader.wam
index
6e3e8f9
..
ec2184c
100644
(file)
--- a/
wasm/reader.wam
+++ b/
wasm/reader.wam
@@
-91,7
+91,7
@@
(else
;;; if (c == '"') isstring = true
(local.set $isstring (i32.eq $c (CHR "\"")))
- (local.set $instring
1
)
+ (local.set $instring
$isstring
)
(block $done
(loop $loop
;; peek at next character
@@
-239,6
+239,8
@@
(if (global.get $error_type) (return 0))
(local.set $tok ($read_token $str))
+
+ (if (global.get $error_type) (return 0))
;;($printf_1 ">>> read_form 1: %s\n" $tok)
;;; c0 = token[0]
(local.set $c0 (i32.load8_u $tok))