Skip to content

Commit

Permalink
Fixed incorrect check of adjacent memcpy regions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunderberg committed Apr 5, 2022
1 parent 1ec16ea commit 2eaca67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/hexagon/hexagon/hexagon_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ struct MemoryCopy {
: dest(dest), src(src), num_bytes(num_bytes) {}

bool IsDirectlyBefore(const MemoryCopy& other) {
void* src_end = static_cast<unsigned char*>(src);
void* dest_end = static_cast<unsigned char*>(dest);
void* src_end = static_cast<unsigned char*>(src) + num_bytes;
void* dest_end = static_cast<unsigned char*>(dest) + num_bytes;
return (src_end == other.src) && (dest_end == other.dest);
}

Expand Down

0 comments on commit 2eaca67

Please sign in to comment.