From 0765623d6991b62ffcd93ddb6be8a5203a2fa7e2 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 31 May 2015 17:23:06 -0700 Subject: [PATCH] improve fix for Bug #69545 --- NEWS | 4 ++++ ext/ftp/ftp.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index effd8ffea4..3713ea9a0b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2015 PHP 5.4.42 +- Core: + . Imroved fix for bug #69545 (Integer overflow in ftp_genlist() resulting in + heap overflow). (Max Spelsberg) + - Postgres: . Fixed bug #69667 (segfault in php_pgsql_meta_data). (Remi) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 53560eb149..50d8def77c 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1668,8 +1668,6 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) for (ptr = data->buf; rcvd; rcvd--, ptr++) { if (*ptr == '\n' && lastch == '\r') { lines++; - } else { - size++; } lastch = *ptr; } -- 2.40.0