Skip to content

Commit

Permalink
(Binary Analysis) Fixed bug in MemoryMap::shrinkUnshare
Browse files Browse the repository at this point in the history
ROSE-879
  • Loading branch information
matzke1 committed Apr 28, 2017
1 parent 04f1a99 commit 393c664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/BinaryFormats/MemoryMap.C
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ MemoryMap::shrinkUnshare() {
if (const uint8_t *data = segment.buffer()->data()) {
// Create a new buffer for this segment, copying the old data
Buffer::Ptr buf = AllocatingBuffer::instance(interval.size());
if (buf->write(data, 0, interval.size()) != interval.size()) {
if (buf->write(data + segment.offset(), 0, interval.size()) != interval.size()) {
success = false;
} else {
segment.offset(0);
Expand Down

0 comments on commit 393c664

Please sign in to comment.