Quoting Michael Niedermayer (2021-05-28 22:15:51) > Fixes: Ticket8003 > Fixes: CVE-2020-20453 > > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > --- > libavcodec/aacenc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c > index aa223cf25f..e80591ba86 100644 > --- a/libavcodec/aacenc.c > +++ b/libavcodec/aacenc.c > @@ -28,6 +28,7 @@ > * TODOs: > * add sane pulse detection > ***********************************/ > +#include <float.h> > > #include "libavutil/libm.h" > #include "libavutil/float_dsp.h" > @@ -852,7 +853,7 @@ static int aac_encode_frame(AVCodecContext *avctx, > AVPacket *avpkt, > /* Not so fast though */ > ratio = sqrtf(ratio); > } > - s->lambda = FFMIN(s->lambda * ratio, 65536.f); > + s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f);
Would FLT_EPSILON not be more appropriate? IIUC FLT_MIN is still effectively zero. -- Anton Khirnov _______________________________________________ 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".