Skip to content

Fix decoding 55799(null) to pointer or interface - #851

Merged
fxamacker merged 1 commit into
release-2.9from
fxamacker/release-2.9-fix-decoding-55799-with-null-content
Oct 5, 2026
Merged

fxamacker merged 1 commit into
release-2.9from
fxamacker/release-2.9-fix-decoding-55799-with-null-content

Conversation

@fxamacker

Copy link
Copy Markdown
Owner

Not affected: user apps that don't decode CBOR null or undefined enclosed in tag number 55799 (e.g. 55799(null)) to a pointer or interface value.

Tag number 55799 has no semantics (RFC 8949 Section 3.4.6), so 55799(null) should decode the same as null. Previously, decoding 55799(null) set a nil pointer to a new zero value, and let a non-nil pointer or interface keep its value.

This PR decodes 55799(null) the same as null, setting a pointer and interface to nil. It also allows 55799 enclosing a registered tag to be decoded to an interface implemented by the registered type.

Not affected: user apps that don't decode CBOR null or undefined
enclosed in tag number 55799 (e.g. 55799(null)) to a pointer or
interface value.

Tag number 55799 has no semantics (RFC 8949 Section 3.4.6), so
55799(null) should decode the same as null.  Previously, decoding
55799(null) set a nil pointer to a new zero value, and let a non-nil
pointer or interface keep its value.

This commit decodes 55799(null) the same as null, setting a pointer
and interface to nil.  It also allows 55799 enclosing a registered tag
to be decoded to an interface implemented by the registered type.
@fxamacker fxamacker self-assigned this Oct 4, 2026
@fxamacker
fxamacker merged commit 850c568 into release-2.9 Oct 5, 2026
25 checks passed
fxamacker added a commit that referenced this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants