summaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2021-04-24 10:33:56 -0700
committerDaniel Stenberg <daniel@haxx.se>2021-04-29 15:02:16 +0200
commitf4b85d24b21058215dd67e1c804d47c7b4ee2fda (patch)
tree02b344a5298f901488c949276397617414261f43 /lib/sendf.c
parent6aae7b1761c02a63d4b4154867c5f7853f74bb14 (diff)
downloadcurl-f4b85d24b21058215dd67e1c804d47c7b4ee2fda.tar.gz
lib: remove strlen call from Curl_client_write
At all call sites with an explicit 0 len, pass an appropriate nonzero len. Closes #6954
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 8f6784c67..17d3d51e3 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -616,9 +616,8 @@ CURLcode Curl_client_write(struct Curl_easy *data,
size_t len)
{
struct connectdata *conn = data->conn;
- if(0 == len)
- len = strlen(ptr);
+ DEBUGASSERT(len);
DEBUGASSERT(type <= 3);
/* FTP data may need conversion. */