aboutsummaryrefslogtreecommitdiff
path: root/lib/security.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-31 15:06:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-31 15:06:38 +0000
commit4118c68df18b505483e073b56c8450ad1642f691 (patch)
tree9b55778c6a89b08c5f55ac02baaa25e6ed2da53b /lib/security.c
parent69d5d88259e1542ac2a9da8f17e67c59602159cf (diff)
check Curl_ftpsendf return codes
Diffstat (limited to 'lib/security.c')
-rw-r--r--lib/security.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/security.c b/lib/security.c
index c39f2a0b6..2a92d0bc9 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -413,7 +413,9 @@ sec_prot_internal(struct connectdata *conn, int level)
}
if(level){
- Curl_ftpsendf(conn, "PBSZ %u", s);
+ if(Curl_ftpsendf(conn, "PBSZ %u", s))
+ return -1;
+
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL);
if(nread < 0)
return -1;
@@ -431,7 +433,9 @@ sec_prot_internal(struct connectdata *conn, int level)
conn->buffer_size = s;
}
- Curl_ftpsendf(conn, "PROT %c", level["CSEP"]);
+ if(Curl_ftpsendf(conn, "PROT %c", level["CSEP"]))
+ return -1;
+
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, NULL);
if(nread < 0)
return -1;
@@ -488,7 +492,8 @@ Curl_sec_login(struct connectdata *conn)
}
infof(data, "Trying %s...\n", (*m)->name);
- Curl_ftpsendf(conn, "AUTH %s", (*m)->name);
+ if(Curl_ftpsendf(conn, "AUTH %s", (*m)->name))
+ return -1;
nread = Curl_GetFTPResponse(conn->data->state.buffer, conn, &ftpcode);
if(nread < 0)