Bug #11630: no check for bound of a string

From: Date: Sat, 23 Jun 2001 17:19:42 +0000
Subject: Bug #11630: no check for bound of a string
Groups: php.dev 
Request: Send a blank email to php-dev+get-57770@lists.php.net to get a copy of this message
From: Xuefer@21cn.com Operating system: win2k PHP version: 4.0.5 PHP Bug Type: Strings related Bug description: no check for bound of a string array: $foo = array("bar"); echo $foo[0]; // correct echo $foo[1]; // warnning string?: $foo = "bar"; // 0-b 1-a 3-r echo $foo[0]; // correct echo $foo[4]; // no warnning? safe: $foo = "bar"; // 0-b 1-a 3-r echo $foo; // all rignts $foo[1] = ""; crash in win2k: $foo = "bar"; // 0-b 1-a 3-r echo $foo[0]; echo $foo[4]; // no warnning $foo[1] = $foo[4]; // no warnning echo $foo; // crash! memory cannot be "written" -- Edit Bug report at: http://bugs.php.net/?id=11630&edit=1

« previous php.dev (#57770) next »