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

Fixed missing double empty line after foundValue in GetValueFromReadme. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcialvieira
Copy link

The original idea seems to be to find the end of the string, so I did it using strchr,
the code before this commit is overflowing the length, because it will add the entire
string length counting twice the position, it could be the initial string pointer plus
the entire string length "readmeContents + strlen(readmeContents)" or current pointer
position plus the length of the current position "foundValue + strlen(foundValue)",
but not both.

Without this commit, it may fail depending on the CryptStringToBinaryA behavior when it
encounters the string terminator before the length as it is not a valid base64 character.

The original idea seems to be to find the end of the string, so I did it using strchr,
the code before this commit is overflowing the length, because it will add the entire
string length counting twice the position, it could be the initial string pointer plus
the entire string length "readmeContents + strlen(readmeContents)" or current pointer
position plus the length of the current position "foundValue + strlen(foundValue)",
but not both.

Without this commit, it may fail depending on the CryptStringToBinaryA behavior when it
encounters the string terminator before the length as it is not a valid base64 character.
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.

1 participant