Commit Graph

9 Commits

Author SHA1 Message Date
Madan Kumar 47c1b8e592
fix(libc): only fail sscanf_s fields when the buffer capped the width
A %s or %[ field was treated as overflowed whenever the next input
character could continue it, even when the field width from the format
ended the read. sscanf_s("abcdef", "%3s", buf, 10) returned 0 with an
empty buffer instead of 1 with "abc". Run the overflow check only when
the buffer capacity reduced the width.
2026-10-07 16:25:11 +05:30
Ethan Barr 0653b87497 fix(libc): reject overlapping memcpy_s ranges 2026-10-06 14:26:37 -07:00
Cliff Syner b9c1c8848f feat(libc): implement strnlen_s
The DQbtGaBKlaw import was a throwing stub (libcCyberUnknown17). It is
the NID of "strnlen_s", which C11 K.3.7.4.4 defines as strnlen that
returns 0 for a null pointer.

The removed stub comment from #358 described its call site as
float -> float, which contradicts the hash-verified name; #492 left the
stub untouched for that reason.
2026-10-05 18:26:06 +00:00
boykopovar 244b915c75
Merge branch 'main' into feat/libc-runtime-functions 2026-09-28 09:01:41 +03:00
Dean Galvin 20cc23438f feat(libc): sscanf_s on linux
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 16:53:29 +13:00
Dean Galvin a599eca727 feat(libc): operator new/delete, bounds-checked functions, char locale facets and runtime helpers
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 14:22:48 +13:00
SamG-Coder 39b81364b7 feat(libc): add C-locale character APIs and guest basename 2026-09-25 06:58:41 +10:00
SamG-Coder 730afc79f8 feat(libc): add independent guest strtok state 2026-09-25 06:52:05 +10:00
SamG-Coder 6ba24a895c feat(libs): implement homebrew string compatibility functions 2026-09-25 05:59:07 +10:00