1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 09:56:07 +03:00

Merge pull request #721 from dlatchx/luajit

luajit: file null terminator: raw bits, validate
This commit is contained in:
Mattias Wadman 2023-07-25 19:46:56 +02:00 committed by GitHub
commit 1b9d0fdc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -398,10 +398,9 @@ func LuaJITDecode(d *decode.D) any {
LuaJITDecodeProto(&di, d)
})
}
})
d.FieldU8("end")
d.FieldRawLen("end", 8, d.AssertBitBuf([]byte{0}))
return nil
}

View File

@ -107,4 +107,4 @@ $ fq dv negative.luac
| | | [3]{}: kgc 0x57-0x57.7 (1)
0x50| 00 | . | type: "child" (0) 0x57-0x57.7 (1)
| | | knum[0:0]: 0x58-NA (0)
0x50| 00| | .| | end: 0 0x58-0x58.7 (1)
0x50| 00| | .| | end: raw bits (valid) 0x58-0x58.7 (1)

View File

@ -285,4 +285,4 @@ $ fq dv simple.luac
0x170| 01 08 66 31 00 | ..f1. | [3]: "\x01\bf1" value 0x17a-0x17e.7 (5)
0x170| 01| .| [4]: "\x01\a" value 0x17f-0x181.7 (3)
0x180|07 00 |.. |
0x180| 00| | .| | end: 0 0x182-0x182.7 (1)
0x180| 00| | .| | end: raw bits (valid) 0x182-0x182.7 (1)

View File

@ -237,4 +237,4 @@ $ fq dv simple_stripped.luac
0x130| 02 | . | type: "true" (2) 0x132-0x132.7 (1)
| | | value: true 0x133-NA (0)
| | | knum[0:0]: 0x133-NA (0)
0x130| 00| | .| | end: 0 0x133-0x133.7 (1)
0x130| 00| | .| | end: raw bits (valid) 0x133-0x133.7 (1)