mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
ffplay: cast vp->height to int64 in buffer size check
Fixes Coverity CID 1026769 and 1026756. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
95275551ef
commit
f73d6d2af7
2
ffplay.c
2
ffplay.c
@ -1518,7 +1518,7 @@ static void alloc_picture(VideoState *is)
|
||||
SDL_YV12_OVERLAY,
|
||||
screen);
|
||||
bufferdiff = vp->bmp ? FFMAX(vp->bmp->pixels[0], vp->bmp->pixels[1]) - FFMIN(vp->bmp->pixels[0], vp->bmp->pixels[1]) : 0;
|
||||
if (!vp->bmp || vp->bmp->pitches[0] < vp->width || bufferdiff < vp->height * vp->bmp->pitches[0]) {
|
||||
if (!vp->bmp || vp->bmp->pitches[0] < vp->width || bufferdiff < (int64_t)vp->height * vp->bmp->pitches[0]) {
|
||||
/* SDL allocates a buffer smaller than requested if the video
|
||||
* overlay hardware is unable to support the requested size. */
|
||||
av_log(NULL, AV_LOG_FATAL,
|
||||
|
Loading…
Reference in New Issue
Block a user