Hi Nicolas

On Tue, Jan 07, 2025 at 10:52:17AM +0100, Nicolas George wrote:
> Michael Niedermayer (12025-01-07):
> > Fixes: Memory Data Leak
> > 
> > Found-by: Simcha Kosman <simcha.kos...@cyberark.com>
> > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
> > ---
> >  libavfilter/af_pan.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
> > index 0d20b0307b3..3a11a7d324f 100644
> > --- a/libavfilter/af_pan.c
> > +++ b/libavfilter/af_pan.c
> > @@ -196,7 +196,7 @@ static av_cold int init(AVFilterContext *ctx)
> >          sign = 1;
> >          while (1) {
> >              gain = 1;
> 
> > -            if (sscanf(arg, "%lf%n *%n", &gain, &len, &len))
> > +            if (sscanf(arg, "%lf%n *%n", &gain, &len, &len) == 1)
> 
> IIRC, there are implementations out there that do not respect the
> specification that %n does not increment the conversion count returned
> by the function. I suppose the issue was a negative return value? If so,
> please use >= 1 instead of == 1.

yes it was a negative return

will apply with your suggested change

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to