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

mDNS: protect MDNSResponder::queryService against misuse #7216

Merged
merged 2 commits into from
Apr 15, 2020

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Apr 15, 2020

fixes #7215

@@ -767,6 +767,10 @@ uint32_t MDNSResponder::queryService(const char* p_pcService,
const char* p_pcProtocol,
const uint16_t p_u16Timeout /*= MDNS_QUERYSERVICES_WAIT_TIME*/)
{
if (0 == m_pUDPContext)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a ptr? check against nullptr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. For coherency I sticked to this file's style.

if (0 == m_pUDPContext)

I was afraid to modify too much for when LEAmDNS2 is coming to avoid merge complication.

@devyte devyte merged commit e5f4514 into esp8266:master Apr 15, 2020
@devyte devyte added this to the 2.7.0 milestone Apr 15, 2020
@jjsuwa jjsuwa mentioned this pull request May 3, 2020
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.

Exception (28) on MDNSResponder::queryService
2 participants