diff options
author | Christian König <[email protected]> | 2014-03-14 13:59:19 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2014-03-26 16:29:20 +0100 |
commit | aa2274c1d296c91826633dd687327ecc3cf4d5a6 (patch) | |
tree | 354b7c8af954e73134b98f4364aa846a76bc302b /src/gallium/state_trackers | |
parent | 2de70fe23f320ce4f559e37057fe07b7af99cf5a (diff) |
st/omx/dec: fix possible segfault at eos
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/omx/vid_dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c index e2a28913dde..de1c3825ebb 100644 --- a/src/gallium/state_trackers/omx/vid_dec.c +++ b/src/gallium/state_trackers/omx/vid_dec.c @@ -504,7 +504,7 @@ static OMX_ERRORTYPE vid_dec_DecodeBuffer(omx_base_PortType *port, OMX_BUFFERHEA } if (--priv->num_in_buffers) { - unsigned delta = (min_bits_left - vl_vlc_bits_left(&vlc)) / 8; + unsigned delta = MIN2((min_bits_left - vl_vlc_bits_left(&vlc)) / 8, priv->sizes[1]); priv->in_buffers[0] = priv->in_buffers[1]; priv->sizes[0] = priv->sizes[1] - delta; |