diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-22 03:01:39 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-22 03:01:39 +0000 |
commit | 80e04c2c3518cacaec8ae87b084bdc1c784acc8d (patch) | |
tree | e6521af24ce227fffc20712a280a68dee017d014 /ext/standard/ftp_fopen_wrapper.c | |
parent | 13996df552cb58781b851361dd2593bc422663b6 (diff) | |
download | php-git-80e04c2c3518cacaec8ae87b084bdc1c784acc8d.tar.gz |
Fixed command error in ftp:// wrapper.
# Thanks to Stefan Esser for discovering the problem.
Diffstat (limited to 'ext/standard/ftp_fopen_wrapper.c')
-rw-r--r-- | ext/standard/ftp_fopen_wrapper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 9d3f230747..f756960ba7 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -513,13 +513,13 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, char *path, ch } /* retrieve file */ - memcpy(tmp_line, "RETR", 4); + memcpy(tmp_line, "RETR", sizeof("RETR")); } else if (read_write == 2) { /* Write new file */ - memcpy(tmp_line, "STOR", 4); + memcpy(tmp_line, "STOR", sizeof("STOR")); } else { /* Append */ - memcpy(tmp_line, "APPE", 4); + memcpy(tmp_line, "APPE", sizeof("APPE")); } php_stream_printf(stream TSRMLS_CC, "%s %s\r\n", tmp_line, (resource->path != NULL ? resource->path : "/")); |