ffmpeg | branch: master | Steven Liu <[email protected]> | Thu Oct 10 10:55:29 2019 +0800| [9f023017abedb56ed7cae9cdd888e05db7114c20] | committer: Steven Liu
avformat/sapdec: check av_strdup() return value and fix memleak Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Steven Liu <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f023017abedb56ed7cae9cdd888e05db7114c20 --- libavformat/sapdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c index eddeddeaea..f8bc0d281c 100644 --- a/libavformat/sapdec.c +++ b/libavformat/sapdec.c @@ -142,6 +142,10 @@ static int sap_read_header(AVFormatContext *s) } sap->sdp = av_strdup(&recvbuf[pos]); + if (!sap->sdp) { + ret = AVERROR(ENOMEM); + goto fail; + } break; } _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
