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

Fix double array increment in s_client mysql connect #3799

Closed
wants to merge 1 commit into from
Closed

Fix double array increment in s_client mysql connect #3799

wants to merge 1 commit into from

Conversation

sdann
Copy link
Contributor

@sdann sdann commented Jun 28, 2017

The packet parsing code for the server version string was incrementing
the array index twice on every iteration. This meant that strings with
an even number of characters would pass, but strings with an odd number
(5.7.18-0ubuntu0.16.04.1) would cause the pos variable to get out of sync.

This would cause a later failure with "MySQL packet is broken."

@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Jun 28, 2017
@sdann
Copy link
Contributor Author

sdann commented Jun 28, 2017

I believe this bug fix is trivial enough we can forgo the CLA.

Copy link
Contributor

@richsalz richsalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please amend your commit to put "CLA: trivial" in the text and push it. I agree it's trivial. Thank you!

The packet parsing code for the server version string was incrementing
the array index twice on every iteration. This meant that strings with
an even number of characters would pass, but strings with an odd number
(ex: 5.7.18-0ubuntu0.16.04.1) would cause the pos variable to get out
of sync.

This would cause a later failure with "MySQL packet is broken."

CLA: trivial
@sdann
Copy link
Contributor Author

sdann commented Jun 29, 2017

@richsalz Done.

@richsalz richsalz removed the hold: cla required The contributor needs to submit a license agreement label Jun 29, 2017
Copy link
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is trivial.

@mattcaswell mattcaswell added the approval: done This pull request has the required number of approvals label Jun 29, 2017
@richsalz
Copy link
Contributor

commit 8530039 in master. Thank you!

@richsalz richsalz closed this Jun 29, 2017
levitte pushed a commit that referenced this pull request Jun 29, 2017
The packet parsing code for the server version string was incrementing
the array index twice on every iteration. This meant that strings with
an even number of characters would pass, but strings with an odd number
(ex: 5.7.18-0ubuntu0.16.04.1) would cause the pos variable to get out
of sync.

This would cause a later failure with "MySQL packet is broken."

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #3799)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: done This pull request has the required number of approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants