mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
memcpy() is not safe if source and destination are overlapping.
This commit is contained in:
parent
3d4e11c12a
commit
6b23fb887e
@ -64,9 +64,8 @@ read_next_header(mm_io_c *mm_io,
|
||||
while (1) {
|
||||
if (sp < ep) {
|
||||
bleft = ep - sp;
|
||||
memcpy(buffer, sp, bleft);
|
||||
}
|
||||
else
|
||||
memmove(buffer, sp, bleft);
|
||||
} else
|
||||
bleft = 0;
|
||||
|
||||
if (mm_io->read(buffer + bleft, sizeof(*wphdr) - bleft) !=
|
||||
|
Loading…
Reference in New Issue
Block a user