You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Sergey Kurenkov (JIRA)" <ji...@apache.org> on 2015/04/03 14:23:53 UTC
[jira] [Created] (XALANC-762) Stack is corrupted in
DOMStringHelper::NumberToCharacters() if value is really big
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: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org