Skip to content
Snippets Groups Projects
Commit 76fe69b1 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

no longer attempts to SIZE a NULL pointer, as that wasn't very clever

(but didn't crash or anything)
parent e1bae4fc
No related branches found
No related tags found
No related merge requests found
...@@ -1504,7 +1504,7 @@ CURLcode ftp_perform(struct connectdata *conn) ...@@ -1504,7 +1504,7 @@ CURLcode ftp_perform(struct connectdata *conn)
{ {
/* this is FTP and no proxy */ /* this is FTP and no proxy */
ssize_t nread; ssize_t nread;
CURLcode result; CURLcode result=CURLE_OK;
struct SessionHandle *data=conn->data; struct SessionHandle *data=conn->data;
char *buf = data->state.buffer; /* this is our buffer */ char *buf = data->state.buffer; /* this is our buffer */
...@@ -1544,7 +1544,7 @@ CURLcode ftp_perform(struct connectdata *conn) ...@@ -1544,7 +1544,7 @@ CURLcode ftp_perform(struct connectdata *conn)
/* If we have selected NOBODY and HEADER, it means that we only want file /* If we have selected NOBODY and HEADER, it means that we only want file
information. Which in FTP can't be much more than the file size and information. Which in FTP can't be much more than the file size and
date. */ date. */
if(data->set.no_body && data->set.include_header) { if(data->set.no_body && data->set.include_header && ftp->file) {
/* The SIZE command is _not_ RFC 959 specified, and therefor many servers /* The SIZE command is _not_ RFC 959 specified, and therefor many servers
may not support it! It is however the only way we have to get a file's may not support it! It is however the only way we have to get a file's
size! */ size! */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment