Skip to content

wchar_compat: Implement WideCharToMultiByte for non-Windows platforms - #116

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/wchar-compat-widechartomultibyte
Open

wchar_compat: Implement WideCharToMultiByte for non-Windows platforms#116
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/wchar-compat-widechartomultibyte

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Nov 7, 2025

Copy link
Copy Markdown

Fixes CLIENT-S3. The issue was that: Unsafe wcstombs macro implementation for WideCharToMultiByte causes Access Violation when processing malformed wide character strings from d3d8.dll.

  • Implements WideCharToMultiByte function for non-Windows platforms using wcstombs.
  • Includes null pointer checks for input wcstr.
  • Handles cases where cch is -1 (null-terminated string) or 0.
  • Implements buffer size validation to prevent overflows.
  • Ensures null termination of the output mbstr within the provided buffer size.
  • Returns the number of bytes written to mbstr.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 2501785

Not quite right? Click here to continue debugging with Seer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants