Message ID | 20230413015356.44961-1-jamrial@gmail.com |
---|---|
State | Accepted |
Commit | 19c2dc677f81c940aebe63ed09dacf5c725f0b35 |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/concatf: check if any nodes were allocated | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On 4/12/2023 10:53 PM, James Almer wrote: > Fixes ticket #10304 > > Signed-off-by: James Almer <jamrial@gmail.com> > --- > libavformat/concat.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavformat/concat.c b/libavformat/concat.c > index dc0985e40c..825e43a7fa 100644 > --- a/libavformat/concat.c > +++ b/libavformat/concat.c > @@ -296,6 +296,8 @@ static av_cold int concatf_open(URLContext *h, const char *uri, int flags) > av_bprint_finalize(&bp, NULL); > data->length = i; > > + if (!data->length) > + err = AVERROR_INVALIDDATA; > if (err < 0) > concat_close(h); Will apply set.
diff --git a/libavformat/concat.c b/libavformat/concat.c index dc0985e40c..825e43a7fa 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -296,6 +296,8 @@ static av_cold int concatf_open(URLContext *h, const char *uri, int flags) av_bprint_finalize(&bp, NULL); data->length = i; + if (!data->length) + err = AVERROR_INVALIDDATA; if (err < 0) concat_close(h);
Fixes ticket #10304 Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/concat.c | 2 ++ 1 file changed, 2 insertions(+)