Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20261203182444.GJ5716@brightrain.aerifal.cx>
Date: Thu, 3 Dec 2026 13:24:44 -0500
From: Rich Felker <dalias@...c.org>
To: Wenkai Xing <wenkaixing12@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: wprintf: %p fails with EINVAL

On Thu, Dec 03, 2026 at 03:51:10PM +0800, Wenkai Xing wrote:
>     wprintf_core() does not format numbers itself. It builds a narrow
>     format string and passes it to fprintf(). The length modifier comes
>     from sizeprefix[], which maps 'p' to 'j', so the format built for %p is
>     "%*.*jp". But the narrow printf_core() only accepts 'p' directly after
>     '%'; after the 'j' modifier its state table has just d, i, o, u, x, X
>     and n. So the inner fprintf() rejects the directive with EINVAL. The
>     relevant code is unchanged in master.

Attached patch should fix this.

View attachment "0001-wprintf-fix-non-functional-p-format-specifier.patch" of type "text/plain" (2019 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.