Skip to content

fix(hmac): guard against size_t overflow - #31

Merged
LimiNode merged 2 commits into
mainfrom
codex/check-msg_len-and-block_size-for-overflow
Sep 3, 2025
Merged

fix(hmac): guard against size_t overflow#31
LimiNode merged 2 commits into
mainfrom
codex/check-msg_len-and-block_size-for-overflow

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Summary

  • prevent size_t overflow in get_hmac when reserving inner and outer buffers
  • test oversized message length throws std::overflow_error

Testing

  • cmake -S . -B build -DBUILD_TESTS=ON
  • cmake --build build
  • cd build && ctest

https://chatgpt.com/codex/tasks/task_e_68b8caa0775c832c8a71ae0dbcb6c9e2

@LimiNode
LimiNode merged commit 87fef43 into main Sep 3, 2025
4 checks passed
@LimiNode
LimiNode deleted the codex/check-msg_len-and-block_size-for-overflow branch September 4, 2025 01:41
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.

1 participant