Repository navigation
Releases
v2.10.0
v2.10 speeds up encoding by up to 2.88× and decoding by up to 1.87× with zero memory regressions (B/op, allocs/op), reduces memory use, adds the toindefarray struct tag option, and fixes bugs. The Contributing Guidelines, Security Policy, and templates were extensively updated.
Encoding sorted nested maps of dynamic JSON-like data to CBOR drops from 70 allocs/op to 1 and from 7.2 KiB/op to 4.0 KiB/op in the benchmarks below. Encoding time.Time, big.Int, Tag and Marshaler values, and decoding into time.Time, big.Int and Tag, use 1 to 2 fewer allocs/op (20% to 50% fewer).
This release does not use Go's unsafe package. Performance in user apps depends on configuration and data.
Tests were refactored and coverage increased to 97.7%. Fuzz tests (not yet public) were also extended. Internal checklists and procedures were updated to reduce potential mistakes.
Performance and Benchmarks
Across all 215 benchmarks, there are zero memory regressions (B/op, allocs/op). Just one benchmark showed a speed dip: Marshal/struct_many_flds_all_omitempty_all_empty/map is ~4-5% slower, but only when a struct has 32 fields that are both omitzero and empty (same scenario with an 8-field struct is now faster).
Benchmarks ran with Go 1.26.10 on linux/amd64 (benchstat n=10, p=0.000):
- CBOR Speedup by Data Type: groups of different benchmarks summarized per row
- CBOR Encoding Reflection-Free Speedup: dynamic JSON-like data types and common types
CBOR Speedup by Data Type
| Unmarshal | Speedup | ΔSec/op |
|---|---|---|
| Single values (bool, int, float, byte string, text string) | 1.10× to 1.51×¹ | -8.87% to -33.92%¹ |
| Epoch time, bignum, other tags | 1.18× to 1.64× | -15.33% to -38.91% |
| Arrays and maps to non-struct | 1.33× to 1.87× | -24.63% to -46.49% |
| Arrays and maps to structs | 1.06× to 1.52× | -5.46% to -34.40% |
| Real-world (COSE, CWT, SenML, WebAuthn) | 1.35× to 1.64× | -26.06% to -39.19% |
¹ 2.54× speedup (-60.64%) when decoding into a named []byte type that has methods.
| Marshal | Speedup | ΔSec/op |
|---|---|---|
| Single values (bool, int, float, byte slice, string) | 1.32× to 1.55× | -24.49% to -35.41% |
| time.Time, big.Int, Tag, Marshaler² | 1.15× to 1.63× | -12.94% to -38.84% |
| Slices and maps | 1.35× to 2.88× | -25.97% to -65.26% |
| Structs | 1.57× to 2.17× | -36.37% to -53.96% |
| Structs with omitempty fields | 0.95׳ to 1.35× | +5.01%³ to -25.96% |
| Real-world (COSE, CWT, SenML, WebAuthn) | 1.12× to 1.33× | -10.66% to -24.77% |
² For addressable values (reached through a pointer, struct field, slice element or map value).
³ Only when every field is omitempty and empty: 7.6 ns slower for a 32-field struct, 2.37 ns faster for an 8-field struct. This is the only performance regression in all 215 benchmarks.
CBOR Encoding Reflection-Free Speedup
PR #870 optimized common types: int, int64, uint, uint64, float64, bool, string, nil, []byte, []any, map[any]any, map[string]any, and map[string]string.
| Marshal Benchmark v2.9.6 → v2.10 |
Speedup | Time ΔSec/op |
Memory ΔB/op |
Memory ΔAllocs/op |
|---|---|---|---|---|
| []any | 2.50× | -607.5 ns (-60.03%) | - | - |
| map[string]any | 2.60× | -821.9 ns (-61.47%) | - | - |
| map[string]string | 2.59× | -335.9 ns (-61.34%) | - | - |
| nested_map[any]any | 2.88× | -16.542 µs (-65.26%) | - | - |
| nested_map[string]any | 2.78× | -14.201 µs (-64.01%) | - | - |
| nested_map[any]any, bw_lex | 2.53× | -22.36 µs (-60.54%) | -3314 (-44.72%) | -69 (-98.57%) |
| nested_map[string]any, bw_lex | 2.41× | -19.52 µs (-58.54%) | -3323 (-44.79%) | -69 (-98.57%) |
Upgrade Notes
- Go 1.24 or newer is required (#773). All tests (97.7% coverage) pass on Go 1.24-1.27.
- Pointer-receiver marshal methods (user-implemented methods) are called on the original value instead of a copy when the value is addressable (#866).
Marshalconfigured to useTagsForbiddenreturns an error for abig.Intoutside [-2^64, 2^64-1], andEncModecreation returns an error for settings that would emit tags ifTagsForbiddenis also set (#868).Decoderadvances past well-formed data items rejected byDecOptionsvalue or serialization restrictions (e.g.NaN,IndefLength), andSkipskips them without an error (#872).Marshalconfigured to emit text-based time returns an error fortime.Timeoutside RFC 3339 limits (#873).
TinyGo (experimental)
TinyGo support for v2.10.0 is available in tag tinygo-beta/v2.10.0-tinygo0.42 (branch feature/cbor-tinygo-beta). It requires TinyGo 0.42.0 or newer. It is experimental and not fuzz tested. For details, see TinyGo (https://github.com/fxamacker/cbor#tinygo) in the README.
What's Changed
⭐ Features
- feat: add toindefarray struct tag option for CBOR indefinite-length arrays by @tdnguyenND in #770
🚀 Optimizations
- Optimize encoding speed primarily for slices, maps, and structs by @fxamacker in #806
- Reduce decoding time up to 17% for all CBOR data types by @fxamacker in #807
- Reduce decoding time by inlining well-formedness checks by @fxamacker in #810
- Optimize decoding CBOR byte string by @fxamacker in #811
- Optimize decoding CBOR text string by up to 16% by @fxamacker in #812
- Reduce allocs and bound memory of keyValue pool by @fxamacker in #860
- Reduce allocations when encoding addressable values by @fxamacker in #866
- Add reflection-free encoding for common types (up to 2.8x faster) by @fxamacker in #870
- Reduce allocs to speed up time.Time, Tag, and big.Int by @fxamacker in #886
🛠 Improvements
- Update to require go 1.24 and modernize code by @fxamacker in #773
- Refactor to use slices.SortFunc (Go 1.21+) by @fxamacker in #774
- Small refactor and cleanups by @fxamacker in #815
- Refactor encoding functions to prepare for reflection-free path by @fxamacker in #861
- Refactor struct field sorter to use slices.SortFunc by @fxamacker in #877
🐞 Bug Fixes
- Enforce TagsForbidden for bignums and ByteSliceLaterFormat by @fxamacker in #868
- Advance Decoder past restricted CBOR data items by @fxamacker in #872
- Reject marshaling out-of-range time.Time to RFC 3339 by @fxamacker in #873
- Fix some error messages returned by EncMode() and DecMode() by @fxamacker in #883
- Fix float range check when decoding Unix time by @fxamacker in #889
🧪 Testing
- Shorten benchmark names by @fxamacker in #816
- Move tests and helpers to new files by @fxamacker in #878
- Add checkMarshal test helpers by @fxamacker in #879
- Add checkUnmarshal test helpers by @fxamacker in #881
- Add test helpers for modes, tags, and round trips by @fxamacker in #884
- Refactor invalid option tests to table-driven tests by @fxamacker in #885
- Add checkNoError and checkErrorCase test helpers by @fxamacker in #887
- Standardize test failure messages and fix several test bugs by @fxamacker in #888
- Add more benchmarks by @fxamacker in #891
📖 Documentation
- Update comments to use newer terminology by @fxamacker in #779
- Update TinyGo section in README.md by @fxamacker in #793
- Update doc.go and README.md for v2.10.0 by @fxamacker in #890
📖 Contributing Guidelines, Security Policy, and Templates
- Update PR template to clarify approval requirement by @fxamacker in #849
- Rewrite security policy and reporting guidelines by @fxamacker in #864
- Rewrite PR template to reduce risks from AI and uncoordinated PRs by @fxamacker in #865
- Rewrite bug report form to reduce security risks by @fxamacker in #867
- Rewrite feature request form to help triage and reduce risks by @fxamacker in #869
- Replace docs issue template with an issue form by @fxamacker in #874
- Update security policy, PR template, and issue forms by @fxamacker in #875
- Update CONTRIBUTING.md to reduce risks by @fxamacker in #862
- Improve issue forms for triage and previews by @fxamacker in #880
CI / GitHub Actions
🔎 Details
- Bump govulncheck from v1.1.4 to v1.3.0 by @fxamacker in https://gi...
v2.9.6
v2.9.6 fixes 12 bugs, including an important fix for apps that decode CBOR maps into Go maps, and has one behavior change. API is unchanged but more errors are detected.
Most of these bugs were identified while improving tests and reviewing code for an upcoming release.
Tests and fuzz tests were extended.
Upgrading to v2.9.6 from all prior versions is recommended.
🐞 Important Fix
For use cases outside the "not affected by this bug" list below, decoding a CBOR null or undefined map key or value (including 55799(null)) into a Go map whose key or value type is of bool, integer, float, or string kind kept the previous map entry's key or value (instead of the zero value). See PR #855 for details.
Not affected by this bug:
- Decoding data this codec encoded from the same Go map type, because this codec does not encode to CBOR null from Go values of bool, integer, float, or string kind.
- Apps that don't decode a CBOR null or undefined map key or value into a Go map whose key or value type is of bool, integer, float, or string kind.
- Decoding CBOR maps into structs (struct fields of map type follow the bullet above).
- Decoding CBOR maps into
map[any]any, and intoany(with unchangedDefaultMapType).
⚠️ Behavior change
Decoding CBOR null or undefined into an interface that holds a value now sets it to nil, matching encoding/json (v1 and v2). Previously, the interface kept its value (PR #827), which was not the intended behavior.
🛠 Bug fixes
Some of these bugs could only be triggered by incorrect usage in user apps, such as invalid struct tags or an unsupported DefaultByteStringType setting, etc. None of these bugs were reported by a project affected by them.
Decoding
- Skip CBOR data item when destination struct has incorrect tags by @fxamacker in #821
- Fix decoding CBOR null/undefined to interface value by @fxamacker in #827
- Fix decoding to unaddressable value in interface by @fxamacker in #828
- Improve the DefaultByteStringType check by @fxamacker in #829
- Fix decoding to self-referencing types by @fxamacker in #831
- Fix decoding 55799(null) to pointer or interface by @fxamacker in #851
- Fix stale Go map entry from CBOR null key/value by @fxamacker in #855
Encoding
- Fix encoding self-referencing types by @fxamacker in #833
- Fix panic encoding marshaler of unsupported underlying types by @fxamacker in #834
- Fix omitzero panic encoding struct field of unsupported underlying types implementing marshaler by @fxamacker in #835
- Fix encoding TimeUnixMicro outside 1677 to 2262 by @fxamacker in #837
- Encoded output also changes for some times within one second of either end of that range.
- Reject encoding time.Time when Go formats wrong year by @fxamacker in #838
📖 Documentation
- Improve docs related to encoding time.Time by @fxamacker in #854
Full Changelog: v2.9.4...v2.9.6
v2.9.5
This version was tagged from the default branch by mistake and is retracted.
Use v2.9.6 (https://github.com/fxamacker/cbor/releases/tag/v2.9.6) instead.
v2.9.4
This release fixes potential panics when decoding a CBOR map whose key decodes to an uncomparable Go value under certain conditions.
Not affected: user apps that don't register tag types and don't use map key types that are either named empty interfaces (e.g. type MyAny any) or contain interfaces.
These potential panics can be encountered when one of these two conditions is met:
- user application registers a tag type (via
TagSetinterface) that is an array or struct with uncomparable orinterface{}element or field type, or - user application specifies a destination Go map whose key type is a named empty interface type or a type containing an interface.
This was identified while improving tests and reviewing code for an upcoming release.
Tests and fuzz tests were extended to cover this bug.
Upgrading to v2.9.4 is recommended.
What's Changed
- Fix panic decoding uncomparable map keys under certain conditions by @fxamacker in #817
Full Changelog: v2.9.3...v2.9.4
v2.9.3
This release fixes a potential panic when decoding into a time.Time from a CBOR byte string, map, or array under certain conditions.
Not affected: standard CBOR time data (RFC 8949 tag 0 or tag 1), and decoders configured with timeTag = DecTagRequired.
Upgrading to v2.9.3 is recommended.
The panic stack trace was publicly reported on 2026-08-17, and the fix was released the same day. Fuzz testing was extended to cover this class of bug, and fuzzing of v2.9.3 is ongoing.
What's Changed
- Skip data item when decoding to time.Time fails under certain conditions by @fxamacker in #803
Full Changelog: v2.9.2...v2.9.3
v2.9.2
This release refactors and hardens the streaming encoder by adding stricter checks for encoding CBOR indefinite-length data. Other changes include minor bugfixes, defensive checks, and more tests.
Projects that don't use CBOR indefinite-length data may also want to upgrade (summary of prior releases).
The stricter checks in the encoder prevent improper use of the library and bad inputs from producing malformed CBOR indefinite-length data that would be rejected by the decoder.
This release passed fuzz tests (billions of execs) and it is production quality.
What's Changed
- Reject encoding indefinite-length map with odd item count by @fxamacker in #764
- Reject encoding indefinite-length data item as a chunk inside indefinite-length byte string or text string by @fxamacker in #765
- Make TagSet.Remove a no-op when contentType is nil by @fxamacker in #766
- Refactor indefinite-length encoding and improve chunk validation during encoding by @fxamacker in #767
- Add more tests, fix a nit in unreachable panic message, update docs & ci by @fxamacker in #768
CI / GitHub Actions and Docs
🔎 Details...
- Bump actions/setup-go from 6.3.0 to 6.4.0 by @dependabot[bot] in #760
- Bump github/codeql-action from 4.34.1 to 4.35.1 by @dependabot[bot] in #761
- Bump github/codeql-action from 4.35.1 to 4.35.2 by @dependabot[bot] in #763
- Update README for v2.9.2 release by @fxamacker in #769
Full Changelog: v2.9.1...v2.9.2
v2.9.1
This release includes important bugfixes, defensive checks, improved code quality, and more tests. Although not public, the fuzzer was also improved by adding more fuzz tests.
🐞 Bug fixes related to the keyasint feature
These changes only affect Go struct fields tagged with keyasint:
- [Decoding] Reject integer keys that exceed
math.MaxInt64when decoding CBOR map to a struct withkeyasintfield (PR #757) - [Decoding] Prevent string representation of an integer key from matching the struct field tagged by keyasint (PR #757)
- [Encoding & Decoding] Deduplicate struct fields with the same normalized
keyasinttag values (PR #757)
🐞 Other bug fixes and defensive checks
Some of the bugs fixed are related to decoding extreme values that cannot be encoded with this library. For example, the decoder checks if epoch time encoded as CBOR float value representing hundreds of billions of years overflows int64(seconds).
NOTE: It is generally good practice to avoid using floating point to store epoch time (even when not using CBOR).
- [Decoding] Reject decoding epoch time encoded as floats that overflow int64 (PR #753)
- [Encoding] Return a cloned slice for an empty
RawMessagefromRawMessage.MarshalCBOR(PR #753) - [Encoding] Reject encoding nil inside indefinite-length strings (PR #750)
- [Diagnostic] Accept valid
U+FFFDreplacement character (PR #753)
What's Changed
- 🆕 Add TimeMode encoding option
TimeRFC3339NanoUTCby @fxamacker in #688 - Use actual negative zero in tests by @makew0rld in #708
- Reject encoding nil inside CBOR indefinite-length string by @fxamacker in #750
- Refactor and add tests by @fxamacker in #752
- Small bugfixes, defensive checks, and improvements by @fxamacker in #753
- Refactor parseMapToStruct(), getDecodingStructType(), getEncodingStructType(), and field struct by @fxamacker in #754
- Fix several issues related to keyasint tag option by @fxamacker in #757
CI / GitHub Actions and Docs
🔎 Details...
- Bump github/codeql-action from 3.29.2 to 3.29.4 by @dependabot[bot] in #690
- Bump github/codeql-action from 3.29.4 to 3.29.5 by @dependabot[bot] in #691
- Bump actions/checkout from 4.2.2 to 5.0.0 by @dependabot[bot] in #696
- Bump github/codeql-action from 3.29.7 to 3.29.9 by @dependabot[bot] in #697
- Bump github/codeql-action from 3.29.9 to 3.29.11 by @dependabot[bot] in #700
- Bump github/codeql-action from 3.29.11 to 3.30.0 by @dependabot[bot] in #702
- Bump actions/setup-go from 5.5.0 to 6.0.0 by @dependabot[bot] in #703
- Bump github/codeql-action from 3.30.0 to 3.30.3 by @dependabot[bot] in #706
- Bump github/codeql-action from 3.30.3 to 3.30.4 by @dependabot[bot] in #710
- Bump github/codeql-action from 3.30.4 to 3.30.6 by @dependabot[bot] in #712
- Bump github/codeql-action from 3.30.6 to 4.30.7 by @dependabot[bot] in #713
- Bump github/codeql-action from 4.30.7 to 4.30.8 by @dependabot[bot] in #716
- Bump github/codeql-action from 4.30.8 to 4.30.9 by @dependabot[bot] in #718
- Bump github/codeql-action from 4.30.9 to 4.31.2 by @dependabot[bot] in #720
- Bump github/codeql-action from 4.31.2 to 4.31.3 by @dependabot[bot] in #721
- Bump github/codeql-action from 4.31.3 to 4.31.4 by @dependabot[bot] in #724
- Bump actions/setup-go from 6.0.0 to 6.1.0 by @dependabot[bot] in #725
- Bump actions/checkout from 5.0.0 to 6.0.0 by @dependabot[bot] in #726
- Bump github/codeql-action from 4.31.4 to 4.31.5 by @dependabot[bot] in #727
- Bump github/codeql-action from 4.31.5 to 4.31.6 by @dependabot[bot] in #728
- Bump actions/checkout from 6.0.0 to 6.0.1 by @dependabot[bot] in #729
- Bump github/codeql-action from 4.31.6 to 4.31.8 by @dependabot[bot] in #732
- Bump github/codeql-action from 4.31.8 to 4.31.9 by @dependabot[bot] in #733
- Bump github/codeql-action from 4.31.9 to 4.31.10 by @dependabot[bot] in #738
- Bump actions/setup-go from 6.1.0 to 6.2.0 by @dependabot[bot] in #739
- Bump actions/checkout from 6.0.1 to 6.0.2 by @dependabot[bot] in #740
- Bump github/codeql-action from 4.31.10 to 4.32.0 by @dependabot[bot] in #742
- Bump github/codeql-action from 4.32.0 to 4.32.3 by @dependabot[bot] in #745
- Bump actions/setup-go from 6.2.0 to 6.3.0 by @dependabot[bot] in #746
- Bump github/codeql-action from 4.32.3 to 4.32.4 by @dependabot[bot] in #747
- Bump github/codeql-action from 4.32.4 to 4.32.6 by @dependabot[bot] in #748
- Bump github/codeql-action from 4.32.6 to 4.34.0 by @dependabot[bot] in #749
- Bump github/codeql-action from 4.34.0 to 4.34.1 by @dependabot[bot] in #751
- Update README status section by @fxamacker in #758
New Contributors
- @makew0rld made their first contribution in #708
Full Changelog: v2.9.0...v2.9.1
v2.9.0
v2.9.0 adds new features, refactors tests, and improves docs. New features improve interoperability/transcoding between CBOR & JSON.
v2.9.0 passed fuzz tests and is production quality. However, the new TextUnmarshaler feature will continue being fuzz tested a bit longer due to recent changes. The recent changes are limited and don't affect other parts of the codec that passed ~2 billion execs fuzzing.
What's Changed
- Refactor to use Go standard library functions by @fxamacker in #663
- Improve DupMapKeyError message by @fxamacker in #670
- Add options to support TextMarshaler and TextUnmarshaler by @benluddy in #672
- Add optional support for json.Marshaler and json.Unmarshaler via transcoding by @benluddy in #673
- Refactor tests and update comments by @fxamacker in #678
- Use TextUnmarshaler on byte strings with ByteStringToStringAllowed. by @benluddy in #682
Docs
- README: Document struct field tag "-" by @fxamacker in #653
- Fix IntDecConvertSignedOrBigInt doc comment by @theory in #655
- Update docs for TimeMode, Tag, RawTag, and add example for Embedded JSON Tag for CBOR by @fxamacker in #659
- Update README for Embedded JSON Tag for CBOR (tag 262) by @fxamacker in #662
- Fix typos in some comments by @adeinega in #671
- Update README for v2.9.0 and add Red Hat as a user by @fxamacker in #684
CI
🔎 Details
- Bump github/codeql-action from 3.28.13 to 3.28.15 by @dependabot[bot] in #651
- Bump github/codeql-action from 3.28.15 to 3.28.16 by @dependabot[bot] in #658
- Bump github/codeql-action from 3.28.16 to 3.28.17 by @dependabot[bot] in #660
- Bump actions/setup-go from 5.4.0 to 5.5.0 by @dependabot[bot] in #661
- Bump github/codeql-action from 3.28.17 to 3.28.18 by @dependabot[bot] in #664
- Bump github/codeql-action from 3.28.18 to 3.28.19 by @dependabot[bot] in #667
- Bump github/codeql-action from 3.28.19 to 3.29.0 by @dependabot[bot] in #674
- Bump github/codeql-action from 3.29.0 to 3.29.2 by @dependabot[bot] in #680
Special Thanks
Many thanks to @benluddy for adding these new features! 🎉
- Add opt-in support for encoding.TextMarshaler and encoding.TextUnmarshaler to encode and decode from CBOR text string.
- Add opt-in support for json.Marshaler and json.Unmarshaler via user-provided transcoding function.
New Contributors
Full Changelog: v2.8.0...v2.9.0
v2.8.0
v2.8.0 adds omitzero struct tag option, fixes and deprecates 3 functions, and bumps requirements to go 1.20+.
Many thanks to @liggitt for contributing the omitzero support!
The "omitzero" option omits zero values from encoding, matching stdlib encoding/json behavior.
When specified in thecbortag, the option is always honored.
When specified in thejsontag, the option is honored when building with Go 1.24+.
This release fixes 3 functions (when called directly by user apps) to use same error handling on bad input as cbor.Unmarshal():
RawTag.UnmarshalCBOR()(thanks @thomas-fossati for reporting this!)ByteString.UnmarshalCBOR()SimpleValue.UnmarshalCBOR()
This release also deprecates those 3 functions because they were initially created for internal use. Please use Unmarshal() or UnmarshalFirst() instead.
To preserve backward compatibility, the deprecated functions were added to fuzz tests and will not be removed in v2.x.
What's Changed
- go: update go.mod and ci.yml to require go1.20 or newer (was go1.17) by @fxamacker in #626
- Replace
interface{}withanyby @fxamacker in #627 - Replace
reflect.Ptrwithreflect.Pointerby @fxamacker in #628 - Replace
reflect.PtrTowithreflect.PointerToby @fxamacker in #629 - Add omitzero support by @liggitt in #644
- Update error handling in
RawTag.UnmarshalCBOR(), etc. to matchcbor.Unmarshal()by @fxamacker in #645 - Optimize internal calls to
UnmarshalCBOR()forByteString,RawTag,SimpleValueby @fxamacker in #647
Other Changes
🔍 Details
- Bump github/codeql-action from 3.25.10 to 3.25.11 by @dependabot in #562
- Bump actions/setup-go from 5.0.1 to 5.0.2 by @dependabot in #564
- Bump github/codeql-action from 3.25.11 to 3.25.12 by @dependabot in #565
- Bump github/codeql-action from 3.25.12 to 3.25.14 by @dependabot in #567
- Bump github/codeql-action from 3.25.14 to 3.25.15 by @dependabot in #569
- Bump github/codeql-action from 3.25.15 to 3.26.0 by @dependabot in #571
- Bump govulncheck from 1.0.4 to 1.1.3 by @fxamacker in #572
- Bump github/codeql-action from 3.26.0 to 3.26.2 by @dependabot in #575
- Add go1.23 to ci.yml by @fxamacker in #573
- Bump github/codeql-action from 3.26.2 to 3.26.6 by @dependabot in #580
- Mention new TinyGo feature branch in README by @fxamacker in #582
- Bump github/codeql-action from 3.26.6 to 3.26.8 by @dependabot in #585
- Bump github/codeql-action from 3.26.8 to 3.26.9 by @dependabot in #586
- Bump actions/checkout from 4.1.7 to 4.2.0 by @dependabot in #587
- README: update benchmark comparisons, etc. by @fxamacker in #588
- Bump github/codeql-action from 3.26.9 to 3.26.11 by @dependabot in #590
- README: update to clarify CBOR benchmark comparison and resolve nits by @fxamacker in #591
- README: fix broken link to svg file by @fxamacker in #592
- Bump github/codeql-action from 3.26.11 to 3.26.12 by @dependabot in #594
- Bump actions/checkout from 4.2.0 to 4.2.1 by @dependabot in #593
- Bump github/codeql-action from 3.26.12 to 3.26.13 by @dependabot in #595
- Bump github/codeql-action from 3.26.13 to 3.27.0 by @dependabot in #596
- Bump actions/checkout from 4.2.1 to 4.2.2 by @dependabot in #597
- Bump actions/setup-go from 5.0.2 to 5.1.0 by @dependabot in #598
- Bump github/codeql-action from 3.27.0 to 3.27.4 by @dependabot in #602
- Bump github/codeql-action from 3.27.4 to 3.27.6 by @dependabot in #604
- Bump github/codeql-action from 3.27.6 to 3.27.7 by @dependabot in #605
- Bump actions/setup-go from 5.1.0 to 5.2.0 by @dependabot in #606
- Bump github/codeql-action from 3.27.7 to 3.27.9 by @dependabot in #607
- Bump github/codeql-action from 3.27.9 to 3.28.0 by @dependabot in #608
- Bump github/codeql-action from 3.28.0 to 3.28.1 by @dependabot in #609
- Bump actions/setup-go from 5.2.0 to 5.3.0 by @dependabot in #610
- Bump github/codeql-action from 3.28.1 to 3.28.4 by @dependabot in #614
- Bump github/codeql-action from 3.28.4 to 3.28.8 by @dependabot in #618
- Bump github/codeql-action from 3.28.8 to 3.28.9 by @dependabot in #619
- .github: Bump govulncheck from 1.1.3 to 1.1.4 by @fxamacker in #620
- .github: Require 97% or more code coverage by @fxamacker in #621
- Add missing copyright notice to a few files by @fxamacker in #630
- Bump github/codeql-action from 3.28.9 to 3.28.10 by @dependabot in #631
- Bump github/codeql-action from 3.28.10 to 3.28.11 by @dependabot in #633
- Bump actions/setup-go from 5.3.0 to 5.4.0 by @dependabot in #639
- Bump github/codeql-action from 3.28.11 to 3.28.12 by @dependabot in #641
- Bump github/codeql-action from 3.28.12 to 3.28.13 by @dependabot in #642
- README: fix typo in code example in Struct Tags section by @sschulz-t in #637
- Update docs for cbor v2.8.0 by @fxamacker in #649
New Contributors
- @sschulz-t made their first contribution in #637
- @liggitt made their first contribution in #644
Full Changelog: v2.7.0...v2.8.0
v2.7.1
v2.7.1 fixes 3 functions (when called directly by user apps) to use same error handling on bad inputs as cbor.Unmarshal():
ByteString.UnmarshalCBOR()RawTag.UnmarshalCBOR()SimpleValue.UnmarshalCBOR()
The above 3 fixed functions are deprecated because they were initially created for internal use. Please use Unmarshal() or UnmarshalFirst() instead.
To preserve backward compatibility, the deprecated functions were added to fuzz tests and will not be removed in v2.x.
Before Upgrading to v2.7.1
v2.8.0 is being fuzz tested and will be released later today. It adds support for omitzero struct tag option.
v2.7.1 is the last version to support go 1.17-1.19. v2.8.0 and newer releases will require go 1.20+.
What's Changed
- Update error handling in RawTag.UnmarshalCBOR(), etc. to match cbor.Unmarshal() by @fxamacker in #636
- Optimize internal calls to UnmarshalCBOR() by @fxamacker in #648
Special Thanks
Thanks @thomas-fossati for reporting the bug in RawTag.UnmarshalCBOR() when it is called directly by user apps providing bad input data!
Full Changelog: v2.7.0...v2.7.1