mirror of https://github.com/FFmpeg/FFmpeg.git
A negative `size' will bypass FFMIN(). In the subsequent memcpy() call, `size' will be considered as a large positive value, leading to a buffer overflow. Change the type of `size' to unsigned int to avoid buffer overflow, and simplify overflow checks accordingly. Also change a literal buffer size to use sizeof, and limit the amount of data copied in another memcpy call as well. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>pull/28/head^2
parent
3cff53369a
commit
ecb918e5f0
1 changed files with 5 additions and 6 deletions
Loading…
Reference in new issue