Skip to content

Add serialization size overflow tests#397

Merged
PJK merged 1 commit into
masterfrom
test-serialization-overflow
Feb 8, 2026
Merged

Add serialization size overflow tests#397
PJK merged 1 commit into
masterfrom
test-serialization-overflow

Conversation

@PJK

@PJK PJK commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add test for definite string with SIZE_MAX length (mirrors existing bytestring test)
  • Add test for indefinite bytestring with a SIZE_MAX-length chunk
  • Add test for indefinite string with a SIZE_MAX-length chunk
  • All verify that cbor_serialized_size returns 0 on overflow (via _cbor_safe_signaling_add)

Test plan

  • All 26 tests pass

🤖 Generated with Claude Code

Test that cbor_serialized_size returns 0 for items crafted to overflow
size_t: definite strings, indefinite bytestrings, and indefinite strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PJK
PJK force-pushed the test-serialization-overflow branch from 735a0bb to b30ebdf Compare February 8, 2026 18:53
@PJK
PJK merged commit 55408c6 into master Feb 8, 2026
13 of 16 checks passed
@PJK
PJK deleted the test-serialization-overflow branch February 8, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant