Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mdns): Fix _mdns_append_fqdn excessive stack usage (IDFGH-14506) #744

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

andrew-lifx
Copy link
Contributor

Move "mdns_name_t name" declaration inside loop to move it out of scope and reclain stack space before recursion call.

Description

Move "mdns_name_t name" declaration inside loop to move it out of scope and reclaim stack space before the recursion call.

Related

Fixes #738

Testing

Tested using patched version on product build. Original was triggering a stack overflow. Stack overflow did not occur with patched version.

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.

Move "mdns_name_t name" declaration inside loop to move it out of scope and reclain stack space before recursion call.
@CLAassistant
Copy link

CLAassistant commented Jan 24, 2025

CLA assistant check
All committers have signed the CLA.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 24, 2025
@github-actions github-actions bot changed the title fix(mdns): Fix _mdns_append_fqdn excessive stack usage fix(mdns): Fix _mdns_append_fqdn excessive stack usage (IDFGH-14506) Jan 24, 2025
Copy link
Collaborator

@david-cermak david-cermak left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

All is good, just need to click through the CLA agreement in #744 (comment)

@david-cermak david-cermak merged commit 2e7d240 into espressif:master Jan 28, 2025
129 checks passed
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.

Recursion in mdns.c:_mdns_append_fqdn uses excessive stack space (IDFGH-14479)
4 participants