Skip to content

ETR01SDK-429: check logic of low level l2 functions buff len checking#455

Merged
andreondra merged 5 commits intodevelopfrom
ETR01SDK-429-Check-logic-of-low-level-L2-functions-buff-len-checking
Feb 6, 2026
Merged

ETR01SDK-429: check logic of low level l2 functions buff len checking#455
andreondra merged 5 commits intodevelopfrom
ETR01SDK-429-Check-logic-of-low-level-L2-functions-buff-len-checking

Conversation

@andreondra
Copy link
Contributor

@andreondra andreondra commented Feb 6, 2026

Description

As a part of this PR I went through both API and low-level functions and verified implementation of buffer length checking. I found one place where the check was not implemented. I also enhanced some comments in libtropic_l2.c.


Type of Change

Select the type(s) that best describe your change:

  • 🐛 Bug fix
  • ✨ New feature
  • 🧹 Code cleanup or refactoring
  • 📝 Documentation update
  • 🔧 Build system or toolchain update
  • 🔒 Security improvement
  • Other (please describe):

Checklist

Before submitting, please confirm that you have completed the following:

  • I opened the Pull Request to the develop branch
  • I followed the project's code guidelines
  • I formatted the code using clang-format with the recommended configuration
  • I updated the changelog, or this change does not require it (e.g., internal or non-functional update)
  • The project builds without errors or warnings
  • I have verified the functionality against the hardware/model as applicable
  • I have ensured that public APIs remain backward compatible (if applicable)
  • This PR is ready for review by maintainers (no WIP commits left) and marked as Ready for Review

Optional Checks

You can enable optional CI jobs by checking following boxes. For example, coverage job is useful when modifying or implementing new tests.

  • Measure Test Coverage

@andreondra andreondra requested a review from Copilot February 6, 2026 07:43
@andreondra andreondra self-assigned this Feb 6, 2026
@andreondra andreondra added bug Something isn't working documentation Improvements or additions to documentation labels Feb 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds missing buffer length checking to the lt_session_start function and improves comment consistency in libtropic_l2.c by standardizing protocol layer references to use uppercase (L2/L3 instead of l2/l3).

Changes:

  • Added response length validation check in lt_session_start to verify the handshake response length matches the expected value
  • Standardized comments in libtropic_l2.c to use uppercase L2/L3 notation consistently

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/libtropic.c Added buffer length check for handshake response in lt_session_start function
src/libtropic_l2.c Improved comment consistency by standardizing L2/L3 capitalization and clarifying wording

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andreondra andreondra requested a review from medexs February 6, 2026 08:30
@andreondra andreondra merged commit 0c5b632 into develop Feb 6, 2026
17 checks passed
@andreondra andreondra deleted the ETR01SDK-429-Check-logic-of-low-level-L2-functions-buff-len-checking branch February 6, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants