Edit report at https://bugs.php.net/bug.php?id=60802&edit=1
ID: 60802 Updated by: mar...@php.net Reported by: lars dot westermann at privat dot dk Summary: ibase_trans() gives segfault when passing params -Status: Assigned +Status: Closed Type: Bug Package: InterBase related Operating System: Linux PHP Version: 5.3.9 Assigned To: mariuz Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-01-19 22:31:18] mar...@php.net I saw that difference from 5.4 and now i know what was :) I will merge back patch and 5.3 will look the same like in 5.2 , and 5.4 ------------------------------------------------------------------------ [2012-01-19 22:25:54] mar...@php.net Automatic comment from SVN on behalf of mariuz Revision: http://svn.php.net/viewvc/?view=revision&revision=322477 Log: Fix #60802 ibase_trans() gives segfault when passing params (The &argn passed to zend_parse_parameters shall be a pointer to an integer, not to an unsigned short.) ------------------------------------------------------------------------ [2012-01-19 09:48:11] lars dot westermann at privat dot dk Description: ------------ The ibase_trans() function segfaults when you pass connection-id and/or mode to the function. After comparing both 5.2.x version of interbase.c and 5.3.x version, I found the solution: # diff interbase.c interbase-fix.c 1128c1128,1129 < unsigned short i, argn, link_cnt = 0, tpb_len = 0; --- > unsigned short i, link_cnt = 0, tpb_len = 0; > int argn; The &argn passed to zend_parse_parameters shall be a pointer to an integer, not to an unsigned short. Test script: --------------- $DB = ibase_pconnect($DB_name, $DB_user, $DB_pw ); $TR = ibase_trans($DB); is enough to trigger the error. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60802&edit=1