ws-3d3-b: model/x: counts past the data are refused before allocating (TRUNCATED)
This commit is contained in:
1 parent
1d45c66108
commit
4b9d8e3069
2 files changed
+22
-6
No files matched your search
@@ -287,6 +287,8 @@ do
|
||||
t:check(e4 and e4.code == Err.CORRUPT, "face index out of range: " .. tostring(e4))
|
||||
local _, e5 = decode("xof 0303txt 0032 Frame A { ")
|
||||
t:check(e5 and e5.code == Err.CORRUPT, "unterminated: " .. tostring(e5))
|
||||
local _, e7 = decode("xof 0303txt 0032 Mesh { 33554431; 1; }")
|
||||
t:check(e7 and e7.code == Err.TRUNCATED, "a vertex count past the data is refused before allocating: " .. tostring(e7))
|
||||
local _, e6 = decode(CUBE, { maxValues = 10 })
|
||||
t:check(e6 and e6.code == Err.LIMIT, "maxValues: " .. tostring(e6))
|
||||
t:eq(X.sniff(Bytes.reader(buffer.fromstring(CUBE))), 1, "sniff")
|
||||
|
||||
Reference in new issue
Block a user