diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-01-11 03:20:45 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-21 11:57:51 +0100 |
commit | b37e796082b2d787aff3cd5631bb89c4fd374708 (patch) | |
tree | 30724bdb9f8cd7a6efe2a0f5928f76c86334e16f /libavcodec/hevc_ps.c | |
parent | d5c15ebeaf1914ea5e3e0599d4316d7c4cf74434 (diff) | |
download | ffmpeg-b37e796082b2d787aff3cd5631bb89c4fd374708.tar.gz |
hevc: Use uint64 to check for tile dimensions
And use unsigned datatypes.
Otherwise it would overflow.
Sample-Id: 00001315-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r-- | libavcodec/hevc_ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 1ce8d2ebcb..829294fc9c 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1106,7 +1106,7 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) pps->uniform_spacing_flag = get_bits1(gb); if (!pps->uniform_spacing_flag) { - int sum = 0; + uint64_t sum = 0; for (i = 0; i < pps->num_tile_columns - 1; i++) { pps->column_width[i] = get_ue_golomb_long(gb) + 1; sum += pps->column_width[i]; |