mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 00:50:52 +00:00
A PS5 (firmware 13.590.001) prints a null %s argument as the whole "(null)" under any precision and still pads it to the width, so "%.*s" with 0 and a null pointer gives "(null)", not an empty field. The guest formatter cut "(null)" to the precision, as FreeBSD's vfprintf does. It now drops the precision for a null narrow string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
libc
change [The narrow printf family]
- The narrow printf family (libc) follows a payload process on a PS5 (firmware 13.60): each 16-bit unit of a
%lsor%lcargument is encoded alone, so a surrogate pair gives two 3-byte sequences; a NaN keeps its sign and the+and space flags, and0pads it with spaces; argument positions above 99 work (up to 400 measured; above 65535 throw here); an unknown conversion such as%mor%kprints%and its letter, padded to the width, without taking an argument, and%Cis one in thelibc.prxof PPSA07923 and PPSA05916, where a%lcof 0 prints nothing whatever the width; a positional%C, and%Sinswprintf, take no argument here, which was not measured. The guest'swcrtomband locales are not used. On Linux, formats without those, a floating-point conversion or a%sprecision use glibc, which prints NaN the same way. A null%sargument prints(null)whatever the precision, padded to the width, assnprintfdid in a payload process on a PS5 (firmware 13.590.001):%.3s,%.0sand%.*sof 0 give(null)and%8.2sgives(null). The_sforms print an unknown conversion the same way, as the conversions entry below describes