mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
bethsoftvid: check return value of av_packet_new_side_data()
Fixes null pointer dereference, fixes CID733777. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
313b40efbd
commit
3632f35c8e
@ -187,7 +187,8 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
|
||||
if (vid->palette) {
|
||||
uint8_t *pdata = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
|
||||
BVID_PALETTE_SIZE);
|
||||
memcpy(pdata, vid->palette, BVID_PALETTE_SIZE);
|
||||
if (pdata)
|
||||
memcpy(pdata, vid->palette, BVID_PALETTE_SIZE);
|
||||
av_freep(&vid->palette);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user