On Fri, Aug 26, 2011 at 06:43:03PM +0200, Anton Khirnov wrote:
> 
> On Wed, 24 Aug 2011 16:12:15 +0200, Reinhard Tartler <siret...@tauware.de> 
> wrote:
> > From: Piotr Kaczuba <p.kacz...@attika.ath.cx>
> > 
> > ---
> >  libpostproc/postprocess.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
> > index ca6d85f..fb51d94 100644
> > --- a/libpostproc/postprocess.c
> > +++ b/libpostproc/postprocess.c
> > @@ -731,7 +731,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char 
> > *name, int quality)
> >      ppMode->maxClippedThreshold= 0.01;
> >      ppMode->error=0;
> >  
> > -    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
> > +    memset(temp, 0, GET_MODE_BUFFER_SIZE);
> > +    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
> >  
> >      av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
> >  
> > @@ -787,7 +788,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char 
> > *name, int quality)
> >  
> >                  plen= strlen(p);
> >                  spaceLeft= p - temp + plen;
> > -                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE){
> > +                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE - 1){
> >                      ppMode->error++;
> >                      break;
> >                  }
> > -- 
> > 1.7.4.1
> > 
> 
> Not likely anyone wants to do a proper review. So if this really fixes
> the crash, i suggest we push this.
> 
> And on a totally unrelated note, let's mark libpostproc for removal
> on the next big bump.

+42
Or more formally, libpostproc was never directly used by FFmpeg (let alone
Libav), it's not maintained, its code is horrible (only its author claims
otherwise) and it just add maintaining burden.

So it should be splitted away as a standalone library for the projects that
use it.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to