fix(libSceNet): end IPv4 sceNetInetPton text at whitespace as the PS4 does #7921
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7921"
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 ntamas94 on 2026-10-19T14:07:13Z.
What
sceNetInetPtonwithAF_INETnow ends the text at the first space, tab, LF, VT, FF or CR and converts what comes before it, as the console does. A failed conversion no longer writes to the destination: Winsockinet_ptonstores the parsed prefix before it returns 0 ("1.2.3.4x"leaves01 02 03 04in the buffer), so the conversion goes through a local buffer and is copied only on success. IPv6 is unchanged.Measured on a PS4 (firmware 10.71) with an OpenOrbis homebrew that calls
sceNetInetPtonwith the buffer filled with0xaaandsceNetErrnoLocset to 123 before each call:main(Winsock / glibc)"1.2.3.4"+ space,\t,\n,\v,\for\r01020304"1.2.3.4 5","1.2.3.4 x"01020304" 1.2.3.4","1.2.3.4x","1.2.3.4.","1.2.3.4\x01","1.2.3.4\xa0","1.2. 3.4","1.2.3 ""1.2.3.4x")"1.2.3","01.2.3.4","256.0.0.1""::1 ","::1\t"," ::1","::1x"::1for"::1x")af = 990x8041012f, errno 47sceNetErrnoLockept 123 after every call that returned 0 or 1. The PS5 was not measured; the debt entry says so.Raw output (PS4 firmware 10.71)
Tested
Windows 11 Pro (26200), WinLibs GCC 15.2.0 r7:
guest_sce_netpasses. WithExport.cppfrommainand the new checks,guest_sce_netfails. Linux not run locally. No title or homebrew run on AnyPS5.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T14:17:47Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceNet/Export.cppcore/libs/tests/GuestSceNet.cppdocs/dev/debt/libSceNet.mdcore/libs/tests/GuestSceNet.cppcore/libs/prx/libSceNet/Export.cppcore/libs/prx/libSceNet/Export.cppcore/libs/tests/GuestSceNet.cpp