summaryrefslogtreecommitdiff
path: root/ext/standard/ftp_fopen_wrapper.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-11-22 03:01:39 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-11-22 03:01:39 +0000
commit80e04c2c3518cacaec8ae87b084bdc1c784acc8d (patch)
treee6521af24ce227fffc20712a280a68dee017d014 /ext/standard/ftp_fopen_wrapper.c
parent13996df552cb58781b851361dd2593bc422663b6 (diff)
downloadphp-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.c6
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 : "/"));