Module: libav Branch: master Commit: 9cdddb93bb33c58a5d42239326bc5eae0067366a
Author: Andreas Cadhalpun <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Fri Dec 18 17:24:09 2015 +0100 nutdec: only copy the header if it exists Fixes runtime error: null pointer passed as argument 2, which is declared to never be null Signed-off-by: Andreas Cadhalpun <[email protected]> Signed-off-by: Anton Khirnov <[email protected]> --- libavformat/nutdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 17ae522..e39f7d3 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -890,7 +890,8 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code) ret = av_new_packet(pkt, size + nut->header_len[header_idx]); if (ret < 0) return ret; - memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]); + if (nut->header[header_idx]) + memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]); pkt->pos = avio_tell(bc); // FIXME avio_read(bc, pkt->data + nut->header_len[header_idx], size); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
