diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-03-09 17:15:26 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-03-09 17:23:08 +0100 |
commit | 4d33873c2990b8d6096f60fef384f0efc4482b55 (patch) | |
tree | da4bdd9347f530512e087523b6d80811e5188944 /libavcodec/hevc_ps.c | |
parent | ed06e5d92b4c67b49068d538461fbbe0a53a8c5e (diff) | |
download | ffmpeg-4d33873c2990b8d6096f60fef384f0efc4482b55.tar.gz |
hevc: make pps/sps ids unsigned where necessary
Fixes integer overflow and out of array accesses.
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r-- | libavcodec/hevc_ps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index c4c7ee2223..5e5d4a77e5 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -609,8 +609,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) { const AVPixFmtDescriptor *desc; GetBitContext *gb = &s->HEVClc.gb; - int ret = 0; - int sps_id = 0; + int ret = 0; + unsigned int sps_id = 0; int log2_diff_max_min_transform_block_size; int bit_depth_chroma, start, vui_present, sublayer_ordering_info; int i; @@ -988,8 +988,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) int pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs; int log2_diff_ctb_min_tb_size; int i, j, x, y, ctb_addr_rs, tile_id; - int ret = 0; - int pps_id = 0; + int ret = 0; + unsigned int pps_id = 0; AVBufferRef *pps_buf; HEVCPPS *pps = av_mallocz(sizeof(*pps)); |