Fix double array increment in s_client mysql connect
authorSteven Danneman <sdanneman@securityinnovation.com>
Tue, 27 Jun 2017 22:53:11 +0000 (15:53 -0700)
committerRich Salz <rsalz@openssl.org>
Thu, 29 Jun 2017 12:20:14 +0000 (08:20 -0400)
commit8530039a307f7aa8acb0516fdd38191baa91d434
tree0a19127e33f8b41710472db53f63f6eba57cc510
parent6fc1d33c90015d3ad5738ec99aaa12fdb9640295
Fix double array increment in s_client mysql connect

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 https://github.com/openssl/openssl/pull/3799)
apps/s_client.c