Commit 4b030025 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Michael Niedermayer

avformat/rtsp: Fix null pointer dereference

This fixes CID 1257827.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f0c85d9b
......@@ -2259,6 +2259,8 @@ static int sdp_read_header(AVFormatContext *s)
/* read the whole sdp file */
/* XXX: better loading */
content = av_malloc(SDP_MAX_SIZE);
if (!content)
return AVERROR(ENOMEM);
size = avio_read(s->pb, content, SDP_MAX_SIZE - 1);
if (size <= 0) {
av_free(content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment