Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2000111

[PHP-DEV] PHP 4.0 Bug #7621 Updated: NULL-bytes cause fundamental problems in string processing From: waldschrott <email protected>
Date: 11/15/00

ID: 7621
Updated by: waldschrott
Reported By: vburwitz <email protected>
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:

user replied that problem is partly solved, anyway there's one NS4.x issue remaining

try this...
<?php
echo "abc\0XXX";
echo 'XXY'.str_repeat('as',60);
?>
NS4.x (mozilla,IE etc. won't) simply does not recognize a bunch of characters, it's apparently a Netscape bug and I'm sure we can't do anything here to improve the situation

any ideas anyone?

Previous Comments:
---------------------------------------------------------------------------

[2000-11-05 06:28:40] stas <email protected>
PHP 3 problem?

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

[2000-11-03 19:19:55] waldschrott <email protected>
your example (duped out) with chr(0) again works for me, I
tested now on win32 (4.0.4dev) AND linux(4.0.3dev), both are ok.
perhaps anyone else can try to verify

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

[2000-11-03 13:31:25] waldschrott <email protected>
hm, works for me (4.0.4dev win32)... strlen() is ok. output
is ok.

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

[2000-11-03 09:28:45] vburwitz <email protected>
Fundamental String Append Problem!!!

If NULL-bytes are in a string then appending the string won't work.

e.g. (NULL-byte written as "0" here)

$a ="abc0def";
$b ="1230456";

$a .=$b;

echo $a;
=> "abc"

echo strlen($a);
=> "3"

Well I don't have to mention that the problem is most probably
related to NULL-termination of strings in C/C++.

The above creates a lot of HUGE PROBLEMS and was working
with PHP3, since I am depending on NULL-safe string processing.

Could someone give me a fast reply if something more is known?

Thanks

V. Burwitz

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

Full Bug description available at: http://bugs.php.net/?id=7621

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>