|
Full Disclosure
mailing list archives
Re: {Java,PHP} Server Exploits
From: Valdis.Kletnieks () vt edu
Date: Wed, 09 Feb 2011 15:13:11 -0500
On Wed, 09 Feb 2011 20:54:41 +0100, Christian Sciberras said:
$f=floatval("2.2250738585072011e-308");
echo 'Try 2 => '.$f.'</br>';
Plus, I'm a bit amazed such a bug exists in PHP - since converting to
floating point is a trivial operation, it should have been limited and
safe-guarded from the start.
Take a careful gander at that number, then go look at the floating point spec -
it's a specific corner case that isn't obviously trivial to get right (doing
floating point *right* is a lot harder than it looks - take a class on
numerical methods sometime, you spend 75% of your time dealing with rounding
errors in the last bit).
Having said that, anybody writing floating point support for a package should
probably google 'floating point paranoia' and learn what sort of things to test
for. :)
Attachment:
_bin
Description:
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
By Date
By Thread
Current thread:
|