You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Maxim Valyanskiy <ma...@jet.msk.su> on 2011/02/02 12:32:07 UTC

FYI: Java hangs on parseDouble

Hello!

I found link to interesting problem in JDK: 
http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/

Can this problem occur on XLS parsing? Can it be used for denial of service attack 
of search engines that uses poi/tika for XLS parsing?

best wishes, Max

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: FYI: Java hangs on parseDouble

Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 2 Feb 2011, Maxim Valyanskiy wrote:
> I found link to interesting problem in JDK: 
> http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
>
> Can this problem occur on XLS parsing?

It occurs when turning a very small floating point number from base 10 to 
base 2. I can't think of a case when reading in an excel file where we 
have effectively a string representation for a double that we process. I 
think in all cases we read in single bytes worth of values and shift them 
to make larger ones.

So, I think it only affects writing

That said, I wonder what excel itself does with numbers around the 64/80 
bit boundary...

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org