aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-12 04:39:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-12 04:39:01 +0200
commitc79acacd2ef222fbc644bf7d832d85c626c10d0d (patch)
tree22e0c1d65a68ca01255b7648515ee2c191a7f062 /libavcodec/hevc.c
parentca671beead8c7302e19af64126e6ff9c4d732313 (diff)
downloadffmpeg-c79acacd2ef222fbc644bf7d832d85c626c10d0d.tar.gz
avcodec/hevc: fix nb_sh / nb_sps check
fixes integer overflow Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 0b14c74ac8..8ae8fc7648 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -243,7 +243,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
nb_sps = get_ue_golomb_long(gb);
nb_sh = get_ue_golomb_long(gb);
- if (nb_sh + nb_sps > FF_ARRAY_ELEMS(rps->poc))
+ if (nb_sh + (uint64_t)nb_sps > FF_ARRAY_ELEMS(rps->poc))
return AVERROR_INVALIDDATA;
rps->nb_refs = nb_sh + nb_sps;