# HG changeset patch # User Andreas Woess # Date 1447687767 -3600 # Node ID 75c4ce3a352a9017d395cb7f55001419a1175ae6 # Parent 4b1005e85f9489b3e6b1561f6579f4d3b47e076d add range check to 5-parameter Source#createSection diff -r 4b1005e85f94 -r 75c4ce3a352a truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Mon Nov 16 16:25:13 2015 +0100 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Mon Nov 16 16:29:27 2015 +0100 @@ -543,6 +543,7 @@ * @return newly created object representing the specified region */ public final SourceSection createSection(String identifier, int startLine, int startColumn, int charIndex, int length) { + checkRange(charIndex, length); return new SourceSection(null, this, identifier, startLine, startColumn, charIndex, length); }