On Tue, 12 Nov 2024, Lasse Collin wrote:
On 2024-11-12 Martin Storsjö wrote:
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.)
I understand only now that many apps use main() but ignore argv[] and
instead get the args by some other method. I was too focused on porting
apps written for POSIX systems. I'm sorry.
There's no need to apologize, we did our best effort in mitigating a
potential security issue, and the total landscape of users of the
toolchains is hard to know until you actually break something ;-) We've
all done it once or twice at least.
Regarding the above, I wouldn't exactly think that those apps ignore
argv[] and get the command line some other way - but I'm not entirely
sure; ideally we'd take it up with them to understand exactly what their
setup is and how it works, and how our change broke that.
IMO the otherwise safe change would be to switch to splitting the
commandline in unicode mode and then converting to the narrow charset
(just like we did), but skip the judgement about what is safe other than
that and don't abort.
But it'd be interesting to know how their test cases worked exactly
anyway.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public