-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update Config File Parsing Logic to Parse Services Section #51
Conversation
source/aws_profile.c
Outdated
if (s_parse_by_token(profile_cursor, s_profile_token, NULL) && | ||
s_parse_by_character_predicate(profile_cursor, s_is_whitespace, NULL, 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug in theory: if s_parse_by_token()
returns true but s_parse_by_character_predicate()
returns false, then profile_cursor
is unexpectedly advanced, and the next if (s_parse_by_token(....
block will do unexpected things.
So like it starts with invalid nonsense like "profilesso-session", then the first if-block in this function will advance the cursor to be "sso-session" and then the second if-block would pass, but like ... neither should pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's a great catch. I have fixed it and added a test.
Issue #, if available:
awslabs/aws-crt-swift#308
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.