Sergey Kurenkov created XALANC-762:
--------------------------------------

             Summary: Stack is corrupted in 
DOMStringHelper::NumberToCharacters() if value is really big
                 Key: XALANC-762
                 URL: https://issues.apache.org/jira/browse/XALANC-762
             Project: XalanC
          Issue Type: Bug
          Components: XalanC
    Affects Versions: 1.11
            Reporter: Sergey Kurenkov
            Assignee: Steven J. Hathaway
            Priority: Minor


in functions 
void
DOMStringHelper::NumberToCharacters(
            double              theValue,
            FormatterListener&  formatterListener,
            MemberFunctionPtr   function)

and 

NumberToDOMString(
            double              theValue,
            XalanDOMString&     theResult)

an array is created on stack in order to convert theValue:
char            theBuffer[MAX_PRINTF_DIGITS + 1];

If theValue is quite big for example 1.79769e+308 which is the biggest possible 
double value than theBuffer is overritten since it just allocates only 100 
bytes for storing theValue whereas when this format string is used "%.35f" it 
requires around 350 bytes to store the converted double.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to