Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fxamacker/cbor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.9.2
Choose a base ref
...
head repository: fxamacker/cbor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.9.3
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 18, 2026

  1. Skip data item when decoding to time.Time fails

    NOTE: This issue does not affect standard CBOR time data
    (RFC 8949 tag 0 or tag 1) because the decoder already skips
    those data items on error.  Setting timeTag = DecTagRequired
    also avoids the issue.
    
    When decoding into time.Time from a CBOR byte string, map,
    or array and decoding fails with UnmarshalTypeError, the data
    item at the cursor is not skipped under these decoding options:
    - CBOR byte string, if byteStringToTime == ByteStringToTimeForbidden
      and timeTag != DecTagRequired
    - CBOR array and map, if timeTag != DecTagRequired
    
    Since the cursor is not advanced, a caller can encounter unrelated
    decoding errors or panic if they continue parsing the rest of the
    CBOR data.
    
    This commit resolves the issue by skipping the data item under the
    above conditions, making it consistent with the other options and
    data types when decoding to time.Time.
    fxamacker committed Aug 18, 2026
    Configuration menu
    Copy the full SHA
    c20692a View commit details
    Browse the repository at this point in the history
  2. Merge pull request #803 from fxamacker/fxamacker/fix-unmarshal-to-time

    Skip data item when decoding to time.Time fails under certain conditions
    fxamacker authored Aug 18, 2026
    Configuration menu
    Copy the full SHA
    f0c90b6 View commit details
    Browse the repository at this point in the history
Loading