Skip to content

Commit

Permalink
Merge PR #1308 (Fix oob write in ctable test suite) into max-next
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Mar 23, 2018
2 parents 8ca6904 + 0736ffd commit 4045897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/ctable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ function selftest()
-- keep references to avoid GCing too early
local handle = {}
local function read(size)
local buf = ffi.new('uint8_t[?]', size, file:read(size))
local buf = ffi.new('uint8_t[?]', size)
ffi.copy(buf, file:read(size), size)
table.insert(handle, buf)
return buf
end
Expand Down

0 comments on commit 4045897

Please sign in to comment.