-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[AddressSanitizer] stack-use-after-scope in src/lib/dnssd/Advertiser_… #14699
[AddressSanitizer] stack-use-after-scope in src/lib/dnssd/Advertiser_… #14699
Conversation
…ImplMinimalMdns.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I developed this code, the scoped item was on purpose and the text field settings were copying it out (at least this is what I remember).
Approving since without this is obviously bad use, however this also seems a lot of use on the stack which may need revising.
PR #14699: Size comparison from 3c8d272 to eae33a3 Decreases (1 build for esp32)
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
…ImplMinimalMdns.cpp
Problem
While trying to debug the Tsan issue in #14598 I have found this Asan issue in minimal.
Basically the char array are allocated into a scoped block and a reference to it is passed to
txtFields
which is then used outside of the block.Change overview
Testing
Asan is not complying anymore after this change.