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
Integer bounds and elements accept a trailing NUL #233
area/literalsParse, TryParse and formattingbreakingChanges an answer or a signature — needs a majorbugSomething isn't workingpackage/coreAffects CodoMetis.ValueRangesseverity/lowCosmetic, message or documentation-level differencesilentAnswers wrongly without throwing — fixes go in the next major, never deferred
Integer bounds and elements accept a trailing NUL, which PostgreSQL text cannot hold:
Int32Range.ParseValue("31\0") → 31
Int16Set.Parse("{\"31\0\"}") → {31}
JSON "[1\u0000,5)" as an Int32Range → [1,4]
IntegerLiteral's fast path calls T.TryParse(…, NumberStyles.Integer, …), which tolerates trailing NULs. The new slow path from #127 refuses 0x1F\0 and 1_0\0. The decimal, float, temporal and Guid families refuse a trailing NUL, and StringSet refuses NUL (#133). Found by the pre-tag analysis (#179), part B. Older than 10.0.0: it ships in 9.x.
It is a tightening and silent today, so under the release rule it belongs in this major.
Change
Refuse '\0' before the fast path, on every integer entry point.
Done when
31\0 and a NUL inside a set element are in the refused rows of IntegerLiteralGrammarTests (and the corpus, if it has an integer NUL family), failing with the check removed. The changelog lists it under "what can break you".
area/literalsParse, TryParse and formattingbreakingChanges an answer or a signature — needs a majorbugSomething isn't workingpackage/coreAffects CodoMetis.ValueRangesseverity/lowCosmetic, message or documentation-level differencesilentAnswers wrongly without throwing — fixes go in the next major, never deferred
Activity