On Thu, 2011-12-22 at 17:18 +0100, Luca Barbato wrote: > On 22/12/11 13:45, Tomas Härdin wrote: > > It's also hard to define "crazy" when it comes to MXF. After all, we're > > talking about a format that allows indexing individual scanlines in raw > > footage.. > > So we should accept 64bit/sizeof(the thing) values on 64bit architectures?
*shrugs* An ENOMEM-ish limit is at least a more sensible explanation compared to say arbitrarily going "nope, no more than one million index entries for you". You'd also have to come up with a limit for every kind of table, keeping in mind a lot of tables have variably sized entries.. Thinking a bit further ahead, considering a file may use lots of small table segments that still add up to a lot, allocations should probably happen in some context if you want to place a limit on them. In other words, it seems more fair to say "refusing to allocate more than 1 GiB per demuxer/decoder". An option could then be used to increase said limit. That's obvious quite a bit of work though.. Anyway, INT_MAX is fine. Users with special needs can edit the code. /Tomas _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel