Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-07 Thread Steven Liu
2017-05-05 20:20 GMT+08:00 wm4 :

> On Sat,  6 May 2017 04:06:03 +0800
> Steven Liu  wrote:
>
> > Fixes Coverity CID: 1405453
> >
> > Signed-off-by: Steven Liu 
> > ---
> >  libavformat/matroskadec.c |1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 9e2c9bd..5282ef7 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext
> *s, int64_t init_range)
> > "%" PRId64, s->streams[0]->index_entries[
> i].timestamp);
> >  if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries
> - 1)) {
> >  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> > +av_free(buf);
> >  return AVERROR_INVALIDDATA;
> >  }
> >  end += ret;
>
> LGTM
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Applied!

Thanks
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread wm4
On Sat,  6 May 2017 04:06:03 +0800
Steven Liu  wrote:

> Fixes Coverity CID: 1405453
> 
> Signed-off-by: Steven Liu 
> ---
>  libavformat/matroskadec.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 9e2c9bd..5282ef7 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, 
> int64_t init_range)
> "%" PRId64, 
> s->streams[0]->index_entries[i].timestamp);
>  if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries 
> - 1)) {
>  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> +av_free(buf);
>  return AVERROR_INVALIDDATA;
>  }
>  end += ret;

LGTM
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread Steven Liu
2017-05-05 20:06 GMT+08:00 wm4 :

> On Fri, 5 May 2017 13:59:26 +0200
> Hendrik Leppkes  wrote:
>
> > On Fri, May 5, 2017 at 9:54 PM, Steven Liu  wrote:
> > > Fixes Coverity CID: 1405453
> > >
> > > Signed-off-by: Steven Liu 
> > > ---
> > >  libavformat/matroskadec.c |1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > index 9e2c9bd..5282ef7 100644
> > > --- a/libavformat/matroskadec.c
> > > +++ b/libavformat/matroskadec.c
> > > @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext
> *s, int64_t init_range)
> > > "%" PRId64, s->streams[0]->index_entries[
> i].timestamp);
> > >  if (ret <= 0 || (ret == 20 && i ==  
> > > s->streams[0]->nb_index_entries
> - 1)) {
> > >  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> > > +   av_free(buf);
> > >  return AVERROR_INVALIDDATA;
> > >  }
> > >  end += ret;
> >
> > The change overall seems fine, but whats with the alignment? :)
>
> Tabs, which I think can't be pushed anyway?
>
Yes, my mistake, i use a new computer and forgot config the vim
environment, sorry guys.

> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread Steven Liu
Fixes Coverity CID: 1405453

Signed-off-by: Steven Liu 
---
 libavformat/matroskadec.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 9e2c9bd..5282ef7 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, 
int64_t init_range)
"%" PRId64, 
s->streams[0]->index_entries[i].timestamp);
 if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries - 
1)) {
 av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
+av_free(buf);
 return AVERROR_INVALIDDATA;
 }
 end += ret;
-- 
1.7.1



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread wm4
On Fri, 5 May 2017 13:59:26 +0200
Hendrik Leppkes  wrote:

> On Fri, May 5, 2017 at 9:54 PM, Steven Liu  wrote:
> > Fixes Coverity CID: 1405453
> >
> > Signed-off-by: Steven Liu 
> > ---
> >  libavformat/matroskadec.c |1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 9e2c9bd..5282ef7 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext 
> > *s, int64_t init_range)
> > "%" PRId64, 
> > s->streams[0]->index_entries[i].timestamp);
> >  if (ret <= 0 || (ret == 20 && i ==  
> > s->streams[0]->nb_index_entries - 1)) {
> >  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> > +   av_free(buf);
> >  return AVERROR_INVALIDDATA;
> >  }
> >  end += ret;  
> 
> The change overall seems fine, but whats with the alignment? :)

Tabs, which I think can't be pushed anyway?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread Steven Liu
2017-05-05 19:59 GMT+08:00 Hendrik Leppkes :

> On Fri, May 5, 2017 at 9:54 PM, Steven Liu  wrote:
> > Fixes Coverity CID: 1405453
> >
> > Signed-off-by: Steven Liu 
> > ---
> >  libavformat/matroskadec.c |1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 9e2c9bd..5282ef7 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext
> *s, int64_t init_range)
> > "%" PRId64, s->streams[0]->index_entries[
> i].timestamp);
> >  if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries
> - 1)) {
> >  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> > +   av_free(buf);
> >  return AVERROR_INVALIDDATA;
> >  }
> >  end += ret;
>
> The change overall seems fine, but whats with the alignment? :)
>
oops, i will update a new one.

>
> - Hendrik
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread Hendrik Leppkes
On Fri, May 5, 2017 at 9:54 PM, Steven Liu  wrote:
> Fixes Coverity CID: 1405453
>
> Signed-off-by: Steven Liu 
> ---
>  libavformat/matroskadec.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 9e2c9bd..5282ef7 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, 
> int64_t init_range)
> "%" PRId64, 
> s->streams[0]->index_entries[i].timestamp);
>  if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries 
> - 1)) {
>  av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
> +   av_free(buf);
>  return AVERROR_INVALIDDATA;
>  }
>  end += ret;

The change overall seems fine, but whats with the alignment? :)

- Hendrik
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/matroskadec: fix resource leak

2017-05-05 Thread Steven Liu
Fixes Coverity CID: 1405453

Signed-off-by: Steven Liu 
---
 libavformat/matroskadec.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 9e2c9bd..5282ef7 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, 
int64_t init_range)
"%" PRId64, 
s->streams[0]->index_entries[i].timestamp);
 if (ret <= 0 || (ret == 20 && i ==  s->streams[0]->nb_index_entries - 
1)) {
 av_log(s, AV_LOG_ERROR, "timestamp too long.\n");
+   av_free(buf);
 return AVERROR_INVALIDDATA;
 }
 end += ret;
-- 
1.7.1



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel