add additional sanity checks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1142880 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
efd149c834
commit
9b69954212
@ -38,6 +38,11 @@ public abstract class BytePropertyNode extends PropertyNode {
|
||||
translator.getCharIndex(fcEnd, translator.getCharIndex(fcStart)),
|
||||
buf
|
||||
);
|
||||
|
||||
if ( fcStart > fcEnd )
|
||||
throw new IllegalArgumentException( "fcStart (" + fcStart
|
||||
+ ") > fcEnd (" + fcEnd + ")" );
|
||||
|
||||
this.startBytes = fcStart;
|
||||
this.endBytes = fcEnd;
|
||||
}
|
||||
|
@ -56,6 +56,10 @@ public abstract class PropertyNode implements Comparable, Cloneable
|
||||
_logger.log(POILogger.WARN, "A property claimed to start before zero, at " + _cpStart + "! Resetting it to zero, and hoping for the best");
|
||||
_cpStart = 0;
|
||||
}
|
||||
|
||||
if ( fcStart > fcEnd )
|
||||
throw new IllegalArgumentException( "fcStart (" + fcStart
|
||||
+ ") > fcEnd (" + fcEnd + ")" );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user