[
https://issues.apache.org/jira/browse/AXIS2-5125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497174#comment-13497174
]
Hudson commented on AXIS2-5125:
-------------------------------
Integrated in axis2-1.6 #322 (See
[https://builds.apache.org/job/axis2-1.6/322/])
Merged a couple of fixes to the 1.6 branch to avoid 100% CPU usage
triggered by certain JSON payloads:
* AXIS2-5044 (r1127327; prerequisite for the other fixes)
* AXIS2-5125 (r1243469, r1290999)
* AXIS2-5300 (r1332362, r1332402; requires Axiom 1.2.14) (Revision 1409218)
Result = SUCCESS
veithen :
Files :
* /axis/axis2/java/core/branches/1_6
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/AbstractJSONDataSource.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/AbstractJSONMessageFormatter.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/AbstractJSONOMBuilder.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONBadgerfishDataSource.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONBadgerfishMessageFormatter.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONBadgerfishOMBuilder.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONDataSource.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java
*
/axis/axis2/java/core/branches/1_6/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java
*
/axis/axis2/java/core/branches/1_6/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java
*
/axis/axis2/java/core/branches/1_6/modules/json/test/org/apache/axis2/json/JSONOMBuilderTest.java
* /axis/axis2/java/core/branches/1_6/modules/parent/pom.xml
* /axis/axis2/java/core/branches/1_6/modules/saaj
> JSONOMBuilder drives system to an indefinite loop
> -------------------------------------------------
>
> Key: AXIS2-5125
> URL: https://issues.apache.org/jira/browse/AXIS2-5125
> Project: Axis2
> Issue Type: Bug
> Components: json
> Affects Versions: 1.5.5
> Environment: Mac OS X 10.6.8, JVM 1.6.0_26
> Reporter: Han Gun
> Assignee: Shameera Rathnayaka
> Priority: Critical
> Labels: axis2, json
> Fix For: 1.7.0
>
> Attachments: Client.java, jsonEmptyStringInfiniteLoop.patch,
> JsonInfinteLoop&JSONOMBuilderTest.patch, JsonService.java, services.xml
>
>
> processDocument method in JSONOMBuilder has the following loop:
> char temp = inputStream.read();
> while (temp != ':') {
> ...
> }
> This will lead to an indefinite loop in case a non-json or empty json {}
> payload is posted to the servlet. Actually any payload without colon
> character ':' should reproduce the same problem.
> I fixed it by changing the variable type temp into int and checking if the
> stream has more elements as a guard condition.
> int temp = inputStream.read();
> while (temp > -1 && temp != ':') {
> if (temp != ' ' && temp != '{') {
> localName += (char)temp;
> }
> temp = inputStream.read();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]