Fix # 79171: heap-buffer-overflow in phar_extract_file

We must not access memory outside of the allocated buffer.
This commit is contained in:
Christoph M. Becker 2020-01-26 16:03:35 +01:00 committed by Stanislav Malyshev
parent bbcb8cab8c
commit b01b1f65e7

View file

@ -4184,7 +4184,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
if ('\\' == filename[cnt]) {
filename[cnt] = '/';
}
} while (cnt++ <= filename_len);
} while (cnt++ < filename_len);
}
#endif