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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
30 - 14 = ?
Subscribe to this entry?

 
 [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)

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 21:01:30 2024 UTC