php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71299 ncurses PHP 7 support patch
Submitted: 2016-01-07 06:14 UTC Modified: 2017-10-20 22:30 UTC
Votes:31
Avg. Score:4.6 ± 0.8
Reproduced:27 of 28 (96.4%)
Same Version:18 (66.7%)
Same OS:18 (66.7%)
From: joungkyun at yahoo dot com Assigned:
Status: Suspended Package: ncurses (PECL)
PHP Version: 7.0.1 OS: ALL
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joungkyun at yahoo dot com
New email:
PHP Version: OS:

 

 [2016-01-07 06:14 UTC] joungkyun at yahoo dot com
Description:
------------
This patch file is Support PHP 7 for ncurses extension

Expected result:
----------------
none

Actual result:
--------------
none

Patches

ncurses-php7-support-again.patch (last revision 2016-09-22 13:04 UTC by joungkyun at yahoo dot com)
ncurses-php7-support.patch (last revision 2016-01-07 06:14 UTC by joungkyun at yahoo dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-22 13:11 UTC] joungkyun at yahoo dot com
If you use a character pointer in zend_parse_parameters function, you will meet segfault.

---
char *text;
int   text_len;

if (zend_parse_parameters(ZEND_NUM_ARGS(),"rlls",&handle,&y,&x,&text,&text_len) == FAILURE) {
    return;
}

FETCH_WINRES(w,handle);
RETURN_LONG(mvwaddstr(*w,y,x,text));
---

This issue seems to PHP bug. To correct this problem, you must modify the code as follows.

---
zend_string *text;

if (zend_parse_parameters(ZEND_NUM_ARGS(),"rllS",&handle,&y,&x,&text) == FAILURE) {
    return;
}

FETCH_WINRES(w,handle);
RETURN_LONG(mvwaddstr(*w,y,x,ZSTR_VAL(text)));
---


So, I report new patch "ncurses-php7-support-again.patch"
 [2017-10-20 22:30 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-20 22:30 UTC] kalle@php.net
I'm gonna suspend this report as the ncurses extension seems to no longer be actively maintained, any future maintainer should re-open this report
 [2019-01-10 15:59 UTC] joungkyun at yahoo dot com
Patches submitted for this ticket will continue to be maintained at https://github.com/OOPS-ORG-PHP/ncurses. And support PHP 7.3 now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC