Message ID | 20191010052745.4262-1-lq@chinaffmpeg.org |
---|---|
State | Accepted |
Commit | 9f023017abedb56ed7cae9cdd888e05db7114c20 |
Headers | show |
On Thu, Oct 10, 2019 at 01:27:45PM +0800, Steven Liu wrote: > Signed-off-by: Steven Liu <lq@chinaffmpeg.org> > --- > libavformat/sapdec.c | 4 ++++ > 1 file changed, 4 insertions(+) probably ok thx [...]
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; }
Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/sapdec.c | 4 ++++ 1 file changed, 4 insertions(+)