-
Notifications
You must be signed in to change notification settings - Fork 222
Dangling pointer in setManufacturerData #61
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
Conversation
This code sets the member _manufacturerData to an array on the stack: this causes the crash. SOLUTION:- Actually, We can pass it by reference or make an array global.
Hi @thekunalsaini ,
did you actually test this code? Because it's not going to work... The issue is about tmpManufacturerData
(a local array) being used globally so after the function scope is over the data is not there anymore.
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.
Not going to work
@facchinm making global array will work.
Replaced by #63
@facchinm please tell reason of closing request.
@thekunalsaini because it didn't fix the issue, while #63 does 😉
This code sets the member _manufacturerData to an array on the stack:
this causes the crash.
SOLUTION:-
Actually, We can pass it by reference or make an array global.
@facchinm #56 issue mention this same 10 days back, no merge request is made by the originator of #56 issue so that is why I have make this request.
Thank you