com php-src: Fixed bug #70572 segfault in mysqlnd_connect: NEWS ext/mysqlnd/mysqlnd_net.c

From: Date: Fri, 25 Sep 2015 12:06:28 +0000
Subject: com php-src: Fixed bug #70572 segfault in mysqlnd_connect: NEWS ext/mysqlnd/mysqlnd_net.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89181@lists.php.net to get a copy of this message
Commit: 59de2c037c4c946fc43478edc154d89dda95873d Author: Andrey Hristov <andrey@php.net> Fri, 25 Sep 2015 14:06:28 +0200 Parents: 85be6fe96bd37116726c85ad13381b84ad5da5be Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=59de2c037c4c946fc43478edc154d89dda95873d Log: Fixed bug #70572 segfault in mysqlnd_connect Bugs: https://bugs.php.net/70572 Changed paths: M NEWS M ext/mysqlnd/mysqlnd_net.c Diff: diff --git a/NEWS b/NEWS index 94b1964..845d4a1 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ PHP NEWS (Andrey) . Fixed bug #70456 (mysqlnd doesn't activate TCP keep-alive when connecting to a server). (Sergei Turchanov) + . Fixed bug #70572 segfault in mysqlnd_connect. (Andrey, Remi) - OpenSSL: . Fixed bug #55259 (openssl extension does not get the DH parameters from diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index fa0ea8f..69f4b7a 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -206,8 +206,10 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha if (hashed_details) { mnd_sprintf_free(hashed_details); } - errcode = CR_CONNECTION_ERROR; - SET_CLIENT_ERROR(*error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); + SET_CLIENT_ERROR(*error_info, + CR_CONNECTION_ERROR, + UNKNOWN_SQLSTATE, + errstr? errstr:"Unknown error while connecting"); if (errstr) { /* no mnd_ since we don't allocate it */ efree(errstr);

« previous php.cvs (#89181) next »