mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Fix bug #72716 - initialize buffer before read
This commit is contained in:
commit
2eb182b35d
1 changed files with 3 additions and 2 deletions
|
@ -82,6 +82,7 @@ typedef struct _php_ftp_dirstream_data {
|
|||
*/
|
||||
static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size)
|
||||
{
|
||||
buffer[0] = '\0'; /* in case read fails to read anything */
|
||||
while (php_stream_gets(stream, buffer, buffer_size-1) &&
|
||||
!(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
|
||||
isdigit((int) buffer[2]) && buffer[3] == ' '));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue