Skip to content
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

Buffer size used to read string information is too small #14

Open
delphidabbler opened this issue Jun 5, 2023 · 2 comments
Open

Buffer size used to read string information is too small #14

delphidabbler opened this issue Jun 5, 2023 · 2 comments
Assignees
Labels
accepted bug Something isn't working

Comments

@delphidabbler
Copy link
Member

CommandBuf: array[0..255] of char; // buffer to build API call command str

Buffer size that is used to receive string file information is only 256 chars. This is too small for some of the string information in some of my programs.

@delphidabbler delphidabbler self-assigned this Jun 5, 2023
@delphidabbler delphidabbler added bug Something isn't working accepted labels Jun 5, 2023
@delphidabbler
Copy link
Member Author

Should get the size of required string from call to VerQueryValue and then allocate the buffer.

@delphidabbler
Copy link
Member Author

Not sure that CommandBuf needs to be an array, but should instead be a pointer (PChar). Check the VerQueryValue docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant