| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Writing a memoryview of an mmap back into an overlapping region, through write() or contiguous slice assignment, used memcpy(), which has undefined behavior for overlapping ranges and can corrupt the mapped data. Use overlap-safe copying for both operations. Backport to 3.15 and 3.14.
| if (safe_copy_from_slice(self->data, (char *)vbuf.buf, start, step, | ||
| slicelen) < 0) | ||
| { | ||
| /* The source may overlap the destination, so copy it before |
There was a problem hiding this comment.
Feels like this can hurt performance, let's look for a better solution.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Writing a memoryview of an mmap back into an overlapping region, through write() or contiguous slice assignment, used memcpy(), which has undefined behavior for overlapping ranges and can corrupt the mapped data. Use overlap-safe copying for both operations. Backport to 3.15 and 3.14.