[FFmpeg-devel] [HACK] Remove MAX_STREAMS usages
Fri Aug 13 08:51:06 CEST 2010
On Thu, Aug 12, 2010 at 06:52:54PM -0400, Ronald S. Bultje wrote:
> On Sun, Aug 8, 2010 at 4:40 PM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > this is just a quick hack that removes all usages of
> > MAX_STREAMS.
> I was looking at the MMS use of this, and one is a sanity check to
> make sure we don't add more streams then would be reasonably useless /
> probably trash repeat file / exploit code.
> It seems to me such checks should be introduced elsewhere also. Is
> keeping MAX_STREAMS or a new macro at a reasonably large value (1000
> or so) ok for that? Not for size of arrays, we can forbid that in the
> doxy, but just as a sanity check.
You can add such a limit to the new av_new_stream function, this is no
problems since we can then change or remove it without an API change.
However, if it is relevant to security, I think it is far preferable
to have the MMS code do any necessary checks.
More information about the ffmpeg-devel