Skip to content

Update buffer size notes for (Sym)FindExecutableImage(Ex)(W) #2013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: docs
Choose a base branch
from

Conversation

adeyblue
Copy link
Contributor

@adeyblue adeyblue commented May 7, 2025

All these functions assume a valid output buffer size of 261 characters (MAX_PATH+1).
The DbgHelp.h header has this information as SAL annotations (or whatever they're called this week) but it seems this information hasn't been migrated to the docs.

adeyblue added 5 commits May 7, 2025 23:22
For some reason this function passes MAX_PATH + 1 as the size of ImageFilePath to GetFullPathName, which dutifully clears MAX_PATH + 1 characters and writes past the end of a MAX_PATH sized buffer
@adeyblue
Copy link
Contributor Author

adeyblue commented May 8, 2025

@microsoft-github-policy-service agree company="Magical Glamour Executables"

Though one wonders how anyone can agree to term number 2 'before making a submission' if they're not shown the license until after it's been made

Copy link

@adeyblue : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@Karl-Bridge-Microsoft
Copy link
Contributor

I scanned the dbghelp.h file and did not find a SAL annotation as you specify. Please provide this info.

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

Successfully merging this pull request may close these issues.

2 participants