Repository navigation
fix: correct sscanf %x signedness and avoid a substr copy - #15
Merged
boykopovar merged 1 commit intoSep 27, 2026
Merged
boykopovar merged 1 commit into
boykopovar merged 1 commit into
Conversation
libSceSysmodule/Export.cpp parsed /proc/self/maps device major/minor numbers into signed int with a %x format, which is undefined behaviour per the C standard even though it happened to work on this target; switched to unsigned int to match the format specifier. NidPatcherUtils.hpp's StripNidPostfix built a truncated copy with substr(0, n) where the prefix is already the string itself; resize(n) does the same truncation without the extra allocation and copy. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 tasks done
12 tasks done
This was referenced Oct 22, 2026
hypermoist
pushed a commit
to hypermoist/AnyPS5
that referenced
this pull request
Oct 26, 2026
…gn-in state (boykopovar#15) * feat(bridge): observe every NP, HTTP, SSL and socket export Every export of libSceNpManager, libSceNpEntitlementAccess, libSceNpUniversalDataSystem, libSceNpCommerce, libSceHttp, libSceHttp2, libSceSsl, libSceNet and libSceNetCtl now writes an observation line with its scalar arguments and return code. URL, host, method and path arguments are written as text. Socket binds, connects, sends and receives add their IPv4 address, port and virtual port, and sceNetSetsockopt adds an integer option value, so a game's LAN discovery shows in the log. Payloads are never written. * feat(bridge): report NP reachability from the bridge's sign-in state With the bridge on and the initial user signed in, sceNpGetNpReachabilityState reports reachable (2), and sceNpCheckCallback delivers every change of that state to the reachability callback, as it does for the state callbacks. Signed out or with the bridge off it stays unavailable. A game that waits for reachability before hosting an online session, such as Overcooked! All You Can Eat (PPSA01528), stopped there. * feat(bridge): report sign-up from the bridge's sign-in state With the bridge on and the initial user signed in, sceNpHasSignedUp reports true, because an account signed in to the network has signed up to it. Signed out, for another user or with the bridge off it stays false. * fix(bridge): resolve the merge of main in sceNpManager --------- Co-authored-by: AlxcBTW <187763517+AlxcBTW@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libSceSysmodule/Export.cppparsed/proc/self/mapsdevice major/minor numbers intosigned intwith a%xformat, which is undefined behaviour per the C standard even though it happened to work on this target; switched tounsigned intto match the format specifier.NidPatcherUtils.hpp'sStripNidPostfixbuilt a truncated copy withsubstr(0, n)where the prefix is already the string itself;resize(n)does the same truncation without the extra allocation and copy.Changes
core/libs/prx/libSceSysmodule/Export.cpp:devMajor/devMinornowunsigned int.core/libs/nid/include/nid/NidPatcherUtils.hpp: twosubstr(0, n)calls replaced withresize(n).Testing (Linux, GCC)
ctest: 23/30, the same 7 pre-existing failures as onmain, unaffected by this change.🤖 Generated with Claude Code