Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Fix mismatching allocation/deallocation in AutoPatcher/CreatePatch.cpp #6

Merged

Conversation

png85
Copy link
Contributor

@png85 png85 commented Jul 8, 2014

This PR fixes a mismatching allocation/deallocation of a char array in
the AutoPatcher code:

CreatePatch.cpp:529: _out = new char[_outSize];
CreatePatch.cpp:579: free(out);

Mixing up new/delete and malloc/free is undefined behaviour and should be
avoided.

This commit fixes a mismatching allocation/deallocation of a char array in
the AutoPatcher code:

CreatePatch.cpp:529: *out = new char[*outSize];
CreatePatch.cpp:579: free(out);

Mixing up new/delete and malloc/free is undefined behaviour and should be
avoided.
alliekins added a commit that referenced this pull request Jul 9, 2014
Fix mismatching allocation/deallocation in AutoPatcher/CreatePatch.cpp
@alliekins alliekins merged commit ba9e60b into facebookarchive:master Jul 9, 2014
@png85 png85 deleted the png.AutoPatcher_CreatePatch-UB_fix branch July 10, 2014 11:38
rhard pushed a commit to rhard/RakNet that referenced this pull request Oct 26, 2017
Fix for GetIndexFromKey failing on forwardingRequestList
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants