mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
One more bounds check, though IMO the gif lib really should do this.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21902 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0636ab5f58
commit
d359f1537c
@ -121,10 +121,10 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
|
||||
{
|
||||
int y;
|
||||
int cnt = FFMIN(effective_map->ColorCount, 256);
|
||||
int l = FFMIN(gif->Image.Left, priv->w);
|
||||
int t = FFMIN(gif->Image.Top, priv->h);
|
||||
int w = FFMIN(gif->Image.Width, priv->w - l);
|
||||
int h = FFMIN(gif->Image.Height, priv->h - t);
|
||||
int l = FFMAX(FFMIN(gif->Image.Left, priv->w), 0);
|
||||
int t = FFMAX(FFMIN(gif->Image.Top, priv->h), 0);
|
||||
int w = FFMAX(FFMIN(gif->Image.Width, priv->w - l), 0);
|
||||
int h = FFMAX(FFMIN(gif->Image.Height, priv->h - t), 0);
|
||||
|
||||
// copy the palette
|
||||
for (y = 0; y < cnt; y++) {
|
||||
|
Loading…
Reference in New Issue
Block a user