7442ea2b
wire: reject illegal wire types 6/7 in decode_tag
Wire types 6 and 7 are never assigned in the protobuf wire format; only 0 (VARINT), 1 (I64), 2 (LEN), 3/4 (SGROUP/EGROUP, proto2-only), and 5 (I32) are valid. skip_field already rejected them for unknown fields, but the decode loop in codec.lua and inline.go dispatched to a typed reader whenever the field ID was known — the reader ignored wt and called the value-specific decoder anyway, accepting bytes that should have been a parse error. Moves the check into decode_tag so every parser path — codec, generated inline code, lazy, and map sub-fields — rejects 6/7 uniformly. Drops 24 entries from test/conformance/known_failures.txt.
Eugene Blikh <bigbes@gmail.com> — 2026-05-15 21:15:51 UTC
Commit 7442ea2be09fc5d4eebd1c3fa679ff3422f405a7 —
view raw patch
Parent(s):
0c13fd73
| File | Status | + | − |
|---|---|---|---|
runtime/pb/wire.lua
|
M | +6 | -2 |
test/conformance/known_failures.txt
|
M | -24 |