php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2038 uksort sorting strings
Submitted: 1999-08-11 19:20 UTC Modified: 2000-07-05 02:28 UTC
From: php3 at tainted dot org Assigned:
Status: Closed Package: Misbehaving function
PHP Version: Earlier? Upgrade first! OS: linux
Private report: No CVE-ID: None
 [1999-08-11 19:20 UTC] php3 at tainted dot org
an array, constructed like:

$fields = array(1 => "Name", 2 => "Status", 3 => "Sex");

$a[$fields[1]] = "Zeev";
$a[$fields[2]] = "Cool";
$a[$fields[3]] = "Too Much";

sent to uksort($a,mySortRoutine);
seems to add a trailing NULL at the end so the two
args passed in are "Name\0" and "Status\0".


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-11 18:27 UTC] joey at cvs dot php dot net
Perhaps you could supply a test case, including UD sort routine?
Also, what version of PHP?
 [1999-11-11 18:32 UTC] php3 at tainted dot org
version is 3.0.9, the sort routine from the example:

http://www.php.net/manual/function.uksort.php3

should be enough to trigger it.

 [1999-11-11 18:44 UTC] joey at cvs dot php dot net
Unable to verify. Tried on debian linux 2.1, PHP 3.0.9 as cgi (not apache module).
Can you verify taht the bug is still there? Have you tried upgrading? (PHP3 is currently
@ 3.0.12)
 [1999-11-12 12:02 UTC] joey at cvs dot php dot net
Marking as analyzed, will close if I don't see verification that bug is still there
 [2000-07-05 02:28 UTC] rasmus at cvs dot php dot net
Well, I can't reproduce this either, and the report is getting dated.  Re-open if someone can reproduce this one with a current version of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 06:01:34 2024 UTC