Hi Nicolas On Wed, Jul 09, 2025 at 02:04:03PM +0200, Nicolas George wrote: > Michael Niedermayer (HE12025-07-07): > > a file called self_ref.ffconcat, containing: > > > > ffconcat version 1.0 > > file self_ref.ffconcat > > Oh, that. Thanks for explaining. I am not sure it is our responsibility > to protect from this, there are many instance of similar pitfalls, for > example a shell wrapper for a command with the same name that neglects > to not call itself. But if it takes very little code like that, why > not... > > OTOH, three problem I have with the code: > > ELOOP is not portable, and the message does not match the issue. It is > better to have an error message that says nothing ("invalid value") than > an error message that says something wrong ("symbolic links"? what > symbolic links?). ok, chanegd it to AVERROR_INVALIDDATA > > Why do you have to implement it in concat? AFAICS, the call to > ff_copy_whiteblacklists() should be enough to trigger the protection you > added in patch 1/2. Yes but this also affects releases, and adding a field to AVFormatContext is an issue for releases as it changes ABI So the concat patch would go into old release branches and the AVFormatContext one into master Unless someone has a better idea ... > > You are abusing the ff_copy_whiteblacklists() function. Since it is > private, it can be renamed. ff_prepare_nested_muxer()? demuxer but yes, we can rename it thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up.