A bug in MetaPost

Bor Grošelj Simić via metapost <[email protected]> Mon, 30 Jun 2025 01:49:31 +0200
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
Hi,

I found a bug in MetaPost. In source/texk/web2c/mplibdir/mpxout.w, on
line 581, there is a single unescaped '%' that is fed to fprintf as the
format string in line 645. This is UB by the C standard. The problem is
silently ignored by most *printf implementations, but not by the one in
Musl libc, which is how I stumbled upon this bug.

Bor

--
http://tug.org/metapost/