You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by er...@apache.org on 2004/02/17 21:22:22 UTC
cvs commit: xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 DomImpl.java
ericvas 2004/02/17 12:22:21
Modified: v2/src/newstore2/org/apache/xmlbeans/impl/newstore2
DomImpl.java
Log:
Added index checking
Revision Changes Path
1.5 +5 -5 xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java
Index: DomImpl.java
===================================================================
RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DomImpl.java 17 Feb 2004 20:18:41 -0000 1.4
+++ DomImpl.java 17 Feb 2004 20:22:21 -0000 1.5
@@ -2867,7 +2867,7 @@
{
String s = _characterData_getData( c );
- if (offset > s.length() || count < 0)
+ if (offset < 0 || offset > s.length() || count < 0)
throw new IndexSizeError();
if (offset + count > s.length())
@@ -2903,7 +2903,7 @@
{
String s = _characterData_getData( c );
- if (offset > s.length())
+ if (offset < 0 || offset > s.length())
throw new IndexSizeError();
if (arg != null && arg.length() > 0)
@@ -2918,7 +2918,7 @@
{
String s = _characterData_getData( c );
- if (offset > s.length() || count < 0)
+ if (offset < 0 || offset > s.length() || count < 0)
throw new IndexSizeError();
if (offset + count > s.length())
@@ -2948,7 +2948,7 @@
{
String s = _characterData_getData( c );
- if (offset > s.length() || count < 0)
+ if (offset < 0 || offset > s.length() || count < 0)
throw new IndexSizeError();
if (offset + count > s.length())
@@ -2967,7 +2967,7 @@
String s = _characterData_getData( t );
- if (offset > s.length())
+ if (offset < 0 || offset > s.length())
throw new IndexSizeError();
_characterData_deleteData( t, offset, s.length() - offset );
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org