fix(libSceNet): convert sceNetInetPton text and null outputs as measured on a PS5 #10275
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10275"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-23T16:25:54Z.
What
sceNetInetPtonandsceNetInetPtonExmeasured on a retail PS5 (firmware 13.60) throughlibSceNet.sprxfrom a payload process. The sources and console logs are in this gist (pnettopnet4). The debt entries only had PS4 firmware 10.71 results.The console:
sceNetErrnoLocalone when a conversion fails;"::ffff:1.2.3.4 x","::1.2.3.4 "and"1:2:3:4:5:6:1.2.3.4 z"convert while"::1 x","::ffff ","::ffff:1.2.3.4x"and"::ffff:01.2.3.4"fail;dst, returning 1 or 0 without writing and without setting an errno, for both functions;NET_EINVALwith errno 22 for a nullsrc, IPv6 included;dst.AnyPS5 failed IPv6 text with anything after the address, accepted
"::ffff:01.2.3.4"on Windows (the host'sInetPtonallows the leading zero there) and returnedNET_EINVALfor a nulldst. It now trims IPv6 text with a dotted tail at the first whitespace, checks that tail as an IPv4 address, and converts IPv4 text without an output. IPv6 with a nulldstkeepsNET_EINVALinstead of the crash; both debt entries say so.Tested
Windows 11, MinGW (winlibs).
guest_sce_netchecks the IPv6 dotted tails, the rejected forms, the null outputs and the null IPv6 source, and passes three runs in a row.tools/check_conventions.pypasses.tools/pr_overlap.py: #8658, #9231, #9494, #9578, #9727 touch nearby lines; whichever lands second keeps both.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)