This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit a92e0eb339a6f2fef2140fa455b01f4c1b64def1 Author: morningman <morning...@163.com> AuthorDate: Sun Apr 30 20:12:49 2023 +0800 [clone](download) fix be clone action download tablet content length overflow #18851 cherry-pick part of 18851 Co-authored-by: yangzhg <yangz...@gmail.com> --- be/src/http/http_client.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/be/src/http/http_client.h b/be/src/http/http_client.h index b9605afb0f..de6912f906 100644 --- a/be/src/http/http_client.h +++ b/be/src/http/http_client.h @@ -103,6 +103,12 @@ public: curl_off_t cl; auto code = curl_easy_getinfo(_curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl); if (!code) { + if (cl < 0) { + return Status::InternalError( + fmt::format("failed to get content length, it should be a positive value, " + "actrual is : {}", + cl)); + } *length = cl; return Status::OK(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org