Skip to content

Fix: Handle empty input path in Win32 path normalization to prevent invalid API calls - #196

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/win32-empty-path-normalize
Open

Fix: Handle empty input path in Win32 path normalization to prevent invalid API calls#196
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/win32-empty-path-normalize

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 3, 2026

Copy link
Copy Markdown

Fixes CLIENT-1E5. The issue was that: Passing an empty string to GetFullPathNameA returns 0, leading to a buffer size calculation of -1, which causes an access violation in wcsnlen.

  • Added a check in Win32LocalFileSystem::normalizePath to handle cases where the input filePath is empty.
  • If the input path is empty, the function now returns an empty string immediately, avoiding passing invalid parameters to GetFullPathNameA.

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

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