mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/bit: check that pkt->size is 10 in write_packet
Ohter packet sizes are not supported by this muxer.
This avoids a null pointer dereference of pkt->data.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit eeda2c3de8
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
cd74b344c2
commit
81196b6d60
|
@ -133,6 +133,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (pkt->size != 10)
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
avio_wl16(pb, SYNC_WORD);
|
avio_wl16(pb, SYNC_WORD);
|
||||||
avio_wl16(pb, 8 * 10);
|
avio_wl16(pb, 8 * 10);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue