Skip to content

conflicts: Fix memory corruption in resolving conflicts

Stan Hu requested to merge sh-fix-issue-4720 into master

git2go's OdbObject Data() returns a slice pointing to unmanaged object memory and requires that a reference be held as long as the slice is used. However, we currently don't guarantee that the blob sticks around, and we've seen seg faults in production.

To avoid memory corruption, copy the data out into the conflict structure.

Relates to #4720 (closed)

Edited by Stan Hu

Merge request reports