[FFmpeg-devel] [PATCH] avcodec/movtextenc: fix compile warning for type-limits
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Feb 14 20:01:50 EET 2021
Am So., 14. Feb. 2021 um 18:57 Uhr schrieb Nuo Mi <nuomi2021 at gmail.com>:
> > https://github.com/FFmpeg/FFmpeg/blob/21346672270ae723aa774a9c8b0749954a75b3df/libavcodec/movtextenc.c#L110
> > > > > s->count * sizeof(*s->style_attributes) never > 32 bits.
> >
> > This is not correct afaict:
> > The relevant line is 369 not 110, count is of type unsigned and if you
> > multiply it with something >1, it can overflow.
> >
> You are right, the count is unsigned int, but
> https://github.com/FFmpeg/FFmpeg/blob/21346672270ae723aa774a9c8b0749954a75b3df/libavcodec/movtextenc.c#L112
> tells us the value never > 16 bits
No, this is not correct:
Line 112 does not know how often line 369 was called.
Carl Eugen
More information about the ffmpeg-devel
mailing list