Skip to content

Use size_t in wolfSSL_strnstr and reject negative indices in mp_get_digit#10138

Draft
padelsbach wants to merge 1 commit intowolfSSL:masterfrom
padelsbach:cobalt-fixes-2026-04-06
Draft

Use size_t in wolfSSL_strnstr and reject negative indices in mp_get_digit#10138
padelsbach wants to merge 1 commit intowolfSSL:masterfrom
padelsbach:cobalt-fixes-2026-04-06

Conversation

@padelsbach
Copy link
Copy Markdown
Contributor

Description

Please describe the scope of the fix or feature addition.

Fixes zd21539

Testing

Manual review

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

mp_digit mp_get_digit(const mp_int* a, int n)
{
if (a == NULL)
if (a == NULL || n < 0)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No logic change, just makes the code more analyzer friendly per the ZD ticket.

@padelsbach
Copy link
Copy Markdown
Contributor Author

jenkins retest this please

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