Skip to content

Avoid access to already freed memory in JSON code#3076

Closed
pkl97 wants to merge 1 commit intopocoproject:masterfrom
pkl97:master
Closed

Avoid access to already freed memory in JSON code#3076
pkl97 wants to merge 1 commit intopocoproject:masterfrom
pkl97:master

Conversation

@pkl97
Copy link
Copy Markdown
Contributor

@pkl97 pkl97 commented Aug 17, 2020

First doing
_values.erase(key);
invalidates the iterator of the element and so conflicts with
if (key == (*it)->first)

The patch ensures that first the entry in _keys is erased and then the one in _values.

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