diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-11-20 13:40:13 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-11-20 13:40:13 +0100 |
commit | cbae294396429682a22371f23a048dcd0d4c71da (patch) | |
tree | 4a15f3a2089e2a812f62cb4d0ae371aa65112446 /plugin/feedback/url_http.cc | |
parent | 094f4cf77890c5a747a57cf2bed149b0b6933507 (diff) | |
parent | 47c5018f592b61b5e000842bdf5862ff458de488 (diff) | |
download | mariadb-git-cbae294396429682a22371f23a048dcd0d4c71da.tar.gz |
Merge MariaDB 5.1->5.2.
Diffstat (limited to 'plugin/feedback/url_http.cc')
-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>"))) { |