Skip to content

Conversation

gabsuren
Copy link
Collaborator

@gabsuren gabsuren commented Oct 3, 2025

Description

The websocket client code was calling asprintf() functions without checking their return values, which triggered -Werror=unused-result compiler warnings. The asprintf() function returns -1 on memory allocation failure, but the original code ignored this return value, potentially leading to potential crashes or undefined behavior

Testing

esp-protocols CI pipeline execution


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot changed the title fix(websocket): Fix asprintf return value handling in websocket client fix(websocket): Fix asprintf return value handling in websocket client (IDFGH-16571) Oct 3, 2025
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 3, 2025
@gabsuren gabsuren changed the title fix(websocket): Fix asprintf return value handling in websocket client (IDFGH-16571) [websocket]: Fix asprintf return value handling in websocket client (IDFGH-16571) Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants