diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-11-22 10:19:31 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-11-22 10:19:31 +0100 |
commit | a48a91d90f07798deebe514d9d827fb719da7294 (patch) | |
tree | c438c045be1f3d8167b3746aa3ac87f848902aeb /plugin/feedback/url_http.cc | |
parent | 3a1fdc9e7fc65e29320b988f9a69c8acab168ff9 (diff) | |
parent | 13ba0dd286f3296bfbbd202fa76d47770734b472 (diff) | |
download | mariadb-git-a48a91d90f07798deebe514d9d827fb719da7294.tar.gz |
5.3->5.5 merge
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 da751810de0..dd39adbf7a7 100644 --- a/plugin/feedback/url_http.cc +++ b/plugin/feedback/url_http.cc @@ -261,18 +261,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>"))) { |