avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: add some saftey checks to add_metadata_from_side_data()

This fixes potential overreads with crafted files.

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/oggdec: favor av_freep() over av_free()

Found-by: Reimar Döffinger
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/exr: favor av_freep() over av_free() for saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/exr: fix null pointer dereference

Fixes CID1108582

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffv1enc: use 64bit in maxsize calculation

This isnt needed but it cant hurt, its also more consistent with
how its calculated a few lines before.

See: CID1108593
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h264_parser: fix order of operations

Fixes CID1108576

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc: fix EOB/EOS check

Fixes: CID1108575
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: inline cabac in residual coding(cherry picked from commit 17d7a880445b72feb36d684ae1f0597195811e97)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: inline cabac in hls_mvd_coding(cherry picked from commit ad387195ad04e8a005a1bfd509e9e4f827e68fa9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_cabac: trivial simplifications

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc: do not dereference pointer before null check in verify_md5()

Fixes: CID1108607

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc_refs: fix h/vshift calculation in ff_hevc_output_frame()

Fixes CID1108577

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/tiff: remove byte based bpp special case

This case does not work as off is uninitialized and it should be
handled fine by the generic code below

Fixes CID1108608

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wavpackenc: fix uninitialized ret

Fixes CID1108609

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: fix PPS_A_qualcomm_7(cherry picked from commit 2af177a8761c88eb477a658eebcf4264068aa773)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: pretty print(cherry picked from commit 64a4b623b7d66dfc0f3883e5f1d9125c00c3b18c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: Initialize sample aspect to valid value.

Without this, it is 0/0 by default, which is not allowed.
This sets it to 0/1, which means "undefined".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
avcodec/vp9: Add asserts to help source code analyzers

See CID1108596 and CID1108595
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/au: add assert to help source code analyzers

See: CID1108585 and CID1108603
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>