mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-08 17:11:08 +00:00
avformat/spdifenc: bound DTS core_size against the packet size in the HD path
Fixes: out of array read Fixes: yBSax492UIB9 Fixes:482d98f69b(spdifenc: IEC 61937 encapsulation of DTS-HD for HDMI) Found-by: Pavel Kohout (Aisle Research) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit6f80e27654) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -225,7 +225,7 @@ static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
|
||||
* (dtshd_fallback == 0) */
|
||||
ctx->dtshd_skip = 1;
|
||||
}
|
||||
if (ctx->dtshd_skip && core_size) {
|
||||
if (ctx->dtshd_skip && core_size && core_size <= pkt->size) {
|
||||
pkt_size = core_size;
|
||||
if (ctx->dtshd_fallback >= 0)
|
||||
--ctx->dtshd_skip;
|
||||
|
||||
Reference in New Issue
Block a user