diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-11-20 13:57:49 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-11-20 13:57:49 +0100 |
commit | ecf04668a2db3d7fc91e421e68eeb5ab25064aa0 (patch) | |
tree | 67fb1a5b050c913ad21f9c30628ff3ef0fd81f2c /plugin | |
parent | dd2d59924e06afb29e36a6dda56f6fb393ef6c6e (diff) | |
parent | cbae294396429682a22371f23a048dcd0d4c71da (diff) | |
download | mariadb-git-ecf04668a2db3d7fc91e421e68eeb5ab25064aa0.tar.gz |
Merge MariaDB 5.2->5.3
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/feedback/url_http.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc index 71b67a52807..b0028292707 100644 --- a/plugin/feedback/url_http.cc +++ b/plugin/feedback/url_http.cc @@ -258,18 +258,21 @@ int Url_http::send(const char* data, size_t data_length) Extract the first string between <h1>...</h1> tags and put it as a server reply into the error log. */ + len= 0; for (;;) { - size_t i= vio_read(vio, (uchar*)buf + len, sizeof(buf) - len - 1); + size_t i= sizeof(buf) - len - 1; + if (i) + i= vio_read(vio, (uchar*)buf + len, i); if ((int)i <= 0) break; len+= i; } - if (len && len < sizeof(buf)) + if (len) { char *from; - buf[len+1]= 0; // safety + buf[len]= 0; // safety if ((from= strstr(buf, "<h1>"))) { |