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

ESP8266WebServer - fix possible memory leak in request argument handling #9076

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

everslick
Copy link
Contributor

@everslick everslick commented Feb 1, 2024

  • fix possible leak of _postArgs array in case of returning early from _parseForm().
  • don't use _postArgs member, but instead use a new local variable postArgs instead.
  • same for _postArgsLen member vs.local postArgsLen.
  • remove useless NULL pointer check before delete().

fix #9075

* fix possible leak of _postArgs array in case of returning early from _parseForm().
* don't use _postArgs member, but instead use a new local variable postArgs instead.
* same for _postArgsLen member vs.local postArgsLen.
* remove useless NULL pointer check before delete().
@everslick everslick changed the title Fix some minor issues in Parsing-impl.h Fix some minor issues in WebServer::Parsing-impl.h Feb 1, 2024
@mcspr
Copy link
Collaborator

mcspr commented Feb 4, 2024

Should this be combined with #9075 and also remove the member itself?

@mcspr mcspr changed the title Fix some minor issues in WebServer::Parsing-impl.h ESP8266WebServer - fix possible memory leak in request argument handling Feb 9, 2024
@mcspr mcspr merged commit 16e1918 into esp8266:master Feb 9, 2024
28 checks passed
@everslick everslick deleted the patch-2 branch February 9, 2024 14:29
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
…ing (esp8266#9076)

* fix possible leak of _postArgs array in case of returning early from _parseForm().
* don't use _postArgs member, but instead use a new local variable postArgs instead.
* same for _postArgsLen member vs.local postArgsLen.
* remove useless NULL pointer check before delete().
* Remove _postArgs member from ESP8266WebServer.h
* Remove searching through always empty _postArgs array in ESP8266WebServer-impl.h
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.

2 participants