validate in src/Data/Pak/INodeTable.hs is probably wrong, but I can't think of how yet.
My evidence is that we changed the following:
--- a/src/Data/Pak/INodeTable.hs
+++ b/src/Data/Pak/INodeTable.hs
@@ -61,7 +61,7 @@ getFreePages vec = V.toList (V.map fromIntegral (V.elemIndices 3 vec))
followFile :: Vector Word16 -> Word16 -> INodeParser [Word16]
followFile v s =
- do put []
+ do put [s]
if (s == 0)
then pure []
else followINodes v s
Which should change the length of the INode Chain, but validate didn't complain!
validate is only meant to accept the input if it's 256 bytes, but if this changes the length it either wasn't 256 bytes before or after (or both!) but validate didn't say anything.
validatein src/Data/Pak/INodeTable.hs is probably wrong, but I can't think of how yet.My evidence is that we changed the following:
Which should change the length of the INode Chain, but
validatedidn't complain!validateis only meant to accept the input if it's 256 bytes, but if this changes the length it either wasn't 256 bytes before or after (or both!) but validate didn't say anything.