You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cursor): reject protobuf field number zero #752
The Cursor protobuf decoder accepts a field tag with field number zero when a payload follows it. 00 00 is decoded as an unknown varint field, although field number zero is forbidden by the protobuf wire format.
Reproduction
Decode a valid message schema from Uint8Array.from([0x00, 0x00]). The current decoder completes and records an unknown field instead of rejecting the invalid tag.
Expected
Reject tags whose tag >>> 3 is zero before dispatching them as known or unknown fields.
Evidence
The decoder validates wire type but does not validate the extracted field number. This is parser-boundary validation, independent of #748 and #750's varint-width bounds.
Activity
outlier27-cell commentedon Oct 11, 2026
我来认领:补充 field number zero 的最小回归用例,并在通用 decoder 的 tag 校验处拒绝它。