Bug #61804 [Opn->Wfx]: trigger_error() truncates at \0

From: Date: Sun, 22 Apr 2012 04:29:57 +0000
Subject: Bug #61804 [Opn->Wfx]: trigger_error() truncates at \0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-169846@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61804&edit=1

 ID:                 61804
 Updated by:         laruence@php.net
 Reported by:        binarte at gmail dot com
 Summary:            trigger_error() truncates at \0
-Status:             Open
+Status:             Wont fix
 Type:               Bug
 Package:            Output Control
 Operating System:   Linux Mint
 PHP Version:        5.4.0
 Block user comment: N
 Private report:     N

 New Comment:

error message is null-terminated string


Previous Comments:
------------------------------------------------------------------------
[2012-04-21 23:33:49] binarte at gmail dot com

Calls to trigger_error() gets the message truncated whenever the message contains \0. Haven't
tested with other characters, but I believe the bug shouldn't be much diffirint if other
characters truncate the message anyway.

------------------------------------------------------------------------
[2012-04-21 23:31:06] binarte at gmail dot com

Description:
------------
Calls to trigger_error() gets the message truncated whenever 

Test script:
---------------
<?php

$str = 'a';
for ($x = 0; $x < 0x20; $x++){
	$str .= chr($x);	
}
$str .= 'b';

trigger_error($str);

Expected result:
----------------
Notice: a  b in /home/.../bug.php on line 9

Actual result:
--------------
Notice: a in /home/.../bug.php on line 9


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61804&edit=1


Thread (3 messages)

« previous php.bugs (#169846) next »