php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54269 Short exception message buffer causes crash
Submitted: 2011-03-16 06:42 UTC Modified: 2011-05-22 20:56 UTC
From: eav at mobil-soft dot ru Assigned: felipe (profile)
Status: Closed Package: InterBase related
PHP Version: 5.3.5 OS: All
Private report: No CVE-ID: None
 [2011-03-16 06:42 UTC] eav at mobil-soft dot ru
Description:
------------
From FB 2.0 release notes
Size limit for exception messages increased
V. Horsun
Maximum size of exception messages raised from 78 to 1021 bytes.


Patches

IBASE_MSGSIZE (last revision 2011-03-16 05:44 UTC by eav at mobil-soft dot ru)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-16 06:52 UTC] eav at mobil-soft dot ru
-Operating System: +Operating System: All
 [2011-03-16 06:52 UTC] eav at mobil-soft dot ru
Add OS
 [2011-03-20 23:25 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2011-03-20 23:25 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2011-03-20 23:27 UTC] felipe@php.net
-Summary: Segmentation Filed +Summary: Segmentation Fault
 [2011-03-21 07:49 UTC] eav at mobil-soft dot ru
-Status: Feedback +Status: Open
 [2011-03-21 07:49 UTC] eav at mobil-soft dot ru
This example with firebird-client-2.0.3_2. Standard errcode for user exception -836. With firebird-client > 2.0 PHP in segmentation fault for ibase_fetch_assoc.

$link=ibase_connect('my_fb','test','test','win1251',0,1,'');                    
$_iquery="select * from currencyconvertion('40389810100000124671','403898409000000123476',840,1000.00,28.6500)";                                                                 $trans=ibase_trans(IBASE_COMMITTED+IBASE_NOWAIT+IBASE_REC_VERSION,$link);       $query_prep=ibase_prepare($link,$trans,$_iquery);                               $result=ibase_execute($query_prep);                                             $row=ibase_fetch_assoc($result,IBASE_TEXT);                                     
echo 'ErrCode - '.ibase_errcode();                                                    
-------------
Warning: ibase_fetch_assoc(): exception 688 NEGATIVEREMAINDER 21.03.11 At procedure 'PROCEDURE1' line: 26, col: 86
At trigger 'PROCEDURE2' line: 11, col: 3
At procedure 'PROCEDURE3' line: 56, col: 4
At procedure 'PROCEDURE4' line: 187, col: 1
At trigger 'PROCEDURE5' line: 250, col: 1
At procedure 'PROCEDURE6' line: 65, col: 5
At procedure 'PROCEDURE7' line: 39, col: 3
At procedure 'PROCEDURE8' line: 285, col: 1  in /home/eav/temp.php on line 38
ErrCode - 741685298
 [2011-03-24 08:01 UTC] eav at mobil-soft dot ru
CREATE EXCEPTION NEGATIVEREMAINDER 'INVALID REMAINDER IN CURRENT ACCOUNT';
create procedure PROCEDURE_10
as
begin
  /* Procedure Text */
  exception NEGATIVEREMAINDER;
  suspend;
end;
create procedure PROCEDURE_9
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_10;
  suspend;
end;
create procedure PROCEDURE_8
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_9;
  suspend;
end;
create procedure PROCEDURE_7
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_8;
  suspend;
end;
create procedure PROCEDURE_6
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_7;
  suspend;
end;
create procedure PROCEDURE_5
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_6;
  suspend;
end;
create procedure PROCEDURE_4
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_5;
  suspend;
end;
create procedure PROCEDURE_3
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_4;
  suspend;
end;
create procedure PROCEDURE_2
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_3;
  suspend;
end;
create procedure PROCEDURE_1
as
begin
  /* Procedure Text */
  execute procedure PROCEDURE_2;
  suspend;
end;

----------------------------------
execute procedure PROCEDURE_1;
----------------------------------
NEGATIVEREMAINDER.
INVALID REMAINDER IN CURRENT ACCOUNT.
At procedure 'PROCEDURE_10' line: 5, col: 3
At procedure 'PROCEDURE_9' line: 5, col: 3
At procedure 'PROCEDURE_8' line: 5, col: 3
At procedure 'PROCEDURE_7' line: 5, col: 3
At procedure 'PROCEDURE_6' line: 5, col: 3
At procedure 'PROCEDURE_5' line: 5, col: 3
At procedure 'PROCEDURE_4' line: 5, col: 3
At procedure 'PROCEDURE_3' line: 5, col: 3
At procedure 'PROCEDURE_2' line: 5, col: 3
At procedure 'PROCEDURE_1' line: 5, col: 3.
 [2011-05-22 20:54 UTC] felipe@php.net
-Summary: Segmentation Fault +Summary: Short exception message buffer causes crash
 [2011-05-22 20:56 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-05-22 20:56 UTC] felipe@php.net
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/.
 
Thank you for the report, and for helping us make PHP better.


 [2011-05-22 21:06 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=311341
Log: - Fixed bug #54269 (Short exception message buffer causes crash)
 [2012-04-18 09:50 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=584f1c438105ff520d43488e7173418f8af7fbec
Log: - Fixed bug #54269 (Short exception message buffer causes crash)
 [2012-07-24 23:41 UTC] rasmus@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=584f1c438105ff520d43488e7173418f8af7fbec
Log: - Fixed bug #54269 (Short exception message buffer causes crash)
 [2013-11-17 09:38 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=584f1c438105ff520d43488e7173418f8af7fbec
Log: - Fixed bug #54269 (Short exception message buffer causes crash)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC