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: -
Votes:18
Avg. Score:4.6 ± 1.0
Reproduced:16 of 16 (100.0%)
Same Version:11 (68.8%)
Same OS:12 (75.0%)
From: joungkyun at yahoo dot com Assigned:
Status: Open Package: ncurses (PECL)
PHP Version: 7.0.1 OS: ALL
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [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"
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Aug 20 17:01:35 2017 UTC