On Mon, 11 Nov 2024, Lasse Collin wrote:

On 2024-11-11 Pali Rohár wrote:
If application do not want to fail then double quote in _acmdln must
not come from other (non double quote) character. Otherwise argv[]
would be wrongly constructed. And I think that argv[] splitting must
be done correctly.

I agree it makes sense to do splitting correctly even if parsing is
otherwise permissive. It's unlikely enough that someone has used
fullwidth double quotes in a .bat file to quote filenames and expecting
them to work like ASCII double quotes. :-)

If application wants to fail when conversion is not lossless then it
does not matter what would be filled in _acmdln at the time of
application abort / exit call.

Yes.

So I think that as a first step overwriting _acmdln can be useful.
Second step could be to add an option to fail on non-lossless
conversion.

I'm strongly in favor of making the _exit(255) behavior the default
and requiring opt-in to get permissive mode. Most apps will use
whatever is the default. It's easier to fix a few apps that need the
permissive mode than to teach all other apps to enable the strict mode.

FYI, see https://github.com/msys2/MINGW-packages/issues/22462 where someone ran into issues caused by this.

Also see https://ffmpeg.org/pipermail/ffmpeg-devel/2024-November/335936.html where someone else observes other issues related to this. (The description of the issue seems a bit inaccurate, so I tried to comment on it.)

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to