mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/mxg: Use memmove()
Fixes undefined behavior
Fixes: 1700002963a49da13542e0726b7bb758/unknown_unknown_292_658_cov_2141972066_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c7c207aecd
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
19a29c92db
commit
13aaefb70e
@ -182,7 +182,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
if (mxg->soi_ptr - mxg->buffer > mxg->cache_size) {
|
||||
if (mxg->cache_size > 0) {
|
||||
memcpy(mxg->buffer, mxg->buffer_ptr, mxg->cache_size);
|
||||
memmove(mxg->buffer, mxg->buffer_ptr, mxg->cache_size);
|
||||
}
|
||||
|
||||
mxg->buffer_ptr = mxg->buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user