ID:               36944
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ms419 at freezone dot co dot uk
-Status:           Open
+Status:           Closed
-Bug Type:         Unknown/Other Function
+Bug Type:         Strings related
 Operating System: Debian
 PHP Version:      4.4.2
 New Comment:

This bug has been fixed in CVS.

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.

Negative string length is not allowed in this function.
I just committed the patch, from now you'll get an error and FALSE in
this case.


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

[2006-04-02 00:33:02] ms419 at freezone dot co dot uk

Description:
------------
strncmp returns incorrect result given negative len -


fis% php
<?php
var_dump(strncmp('foo_wrapper', '_wrapper', -8));
?>
int(7)
fis% 


expected - int(0)
returned - int(7)

Thanks - Jack



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


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

Reply via email to