Skip to content

Commit e28f36f

Browse files
committed
Prevent unpack overflow, use map+join instead
1 parent d75f12f commit e28f36f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

fnl/conjure/client/common-lisp/swank.fnl

+1-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@
184184
(set opened-quote false)
185185
(table.insert
186186
vals
187-
(string.char
188-
(unpack stack)))
187+
(str.join (a.map string.char stack)))
189188
(set stack []))
190189
(when escaped
191190
;; if we've escaped this quote, put it in.

lua/conjure/client/common-lisp/swank.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ local function parse_separated_list(string_to_parse)
170170
if opened_quote then
171171
if not escaped then
172172
opened_quote = false
173-
table.insert(vals, string.char(unpack(stack)))
173+
table.insert(vals, str.join(a.map(string.char, stack)))
174174
stack = {}
175175
else
176176
end

0 commit comments

Comments
 (0)