Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-23 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: 2021年2月24日 3:53 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too > many styles > > Anton Khirnov: > > Quotin

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-23 Thread Philip Langdale
On Tue, 23 Feb 2021 12:16:53 +0100 Andreas Rheinhardt wrote: > Andreas Rheinhardt: > > The counter for the number of styles is written on two bytes, ergo > > anything > UINT16_MAX is invalid. This also fixes a compiler warning > > because of a tautologically true check on 64bit systems. > > > >

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-23 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Guo, Yejun (2021-02-21 06:31:37) >> >> >>> FYI: The C standard does not mandate the sizes for most types (the uintx_t >>> types are an exception). It also gives the compiler absolute freedom on how >>> much padding to add to a structure. A compiler could very well add

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The counter for the number of styles is written on two bytes, ergo > anything > UINT16_MAX is invalid. This also fixes a compiler warning > because of a tautologically true check on 64bit systems. > > Signed-off-by: Andreas Rheinhardt > --- > A better solution would be to er

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: 2021年2月21日 12:39 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too > many styles > > Guo, Yejun: > > > > &g

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Andreas Rheinhardt
Guo, Yejun: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of >> Andreas Rheinhardt >> Sent: 2021年2月21日 12:12 >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Che

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: 2021年2月21日 12:12 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too > many styles > > Guo, Yejun: > > > > &g

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Andreas Rheinhardt
Guo, Yejun: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of >> Andreas Rheinhardt >> Sent: 2021年2月21日 9:41 >> To: ffmpeg-devel@ffmpeg.org >> Cc: Andreas Rheinhardt >> Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Ch

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: 2021年2月21日 9:41 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many > styles > > The count

[FFmpeg-devel] [PATCH 1/2] avcodec/movtextenc: Check for too many styles

2021-02-20 Thread Andreas Rheinhardt
The counter for the number of styles is written on two bytes, ergo anything > UINT16_MAX is invalid. This also fixes a compiler warning because of a tautologically true check on 64bit systems. Signed-off-by: Andreas Rheinhardt --- A better solution would be to error out as soon as the byte length