-
Notifications
You must be signed in to change notification settings - Fork 66
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: Fix Dereferenced Garbage Pointer #148
fix: Fix Dereferenced Garbage Pointer #148
Conversation
I'm going to give this a deeper look later, am slammed rest of today. |
771e5ba
to
2b19e62
Compare
2b19e62
to
ed957b1
Compare
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.
Changes look great, so nice to see how much cleaner the code is without all that unnecessary C++. Since we're not longer doing the thing that was causing the crash, hopefully this takes care of it.
I was going to spend some time and do some more C++ refactoring, but honestly I have no spare time right now, so I'll go ahead and approve this since that's really unrelated anyway.
# [8.8.0](v8.7.0...v8.8.0) (2022-05-17) ### Bug Fixes * Fix Dereferenced Garbage Pointer ([#148](#148)) ([d2c58e1](d2c58e1)) * property memory annotations ([#146](#146)) ([c95ddf6](c95ddf6)) * update active kits header ([#147](#147)) ([d196723](d196723)) ### Features * add conformsToProtocol forwarding to MPAppDelegateProxy ([#144](#144)) ([40e517a](40e517a)) * add support for client side rules ([#151](#151)) ([6a93096](6a93096))
Summary
A pattern was being used where a static NSString is converted to a std::string via the UTF8String property of NSString, stored in a std::vector, and then retrieved via operator[]. This result is then copied into a new string at the call site, which is where the app crashes.
Master Issue
Closes https://mparticle-eng.atlassian.net/browse/SQDSDKS-3658?atlOrigin=eyJpIjoiY2Q0NmJiNTY1NzAyNGE0MzgxM2RmZGE0MjI4MzViMTciLCJwIjoiaiJ9