mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Tiny change in copying of buffer.
This commit is contained in:
parent
eac689a606
commit
82070f1cdf
1 changed files with 1 additions and 1 deletions
|
@ -552,7 +552,7 @@ PHP_FUNCTION(curl_exec)
|
||||||
ret_data = emalloc(stat_sb.st_size+1);
|
ret_data = emalloc(stat_sb.st_size+1);
|
||||||
|
|
||||||
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
|
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
|
||||||
memcpy(&(ret_data[pos]), buf, b);
|
memcpy(ret_data + pos, buf, b);
|
||||||
pos += b;
|
pos += b;
|
||||||
}
|
}
|
||||||
ret_data[stat_sb.st_size - 1] = '\0';
|
ret_data[stat_sb.st_size - 1] = '\0';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue