Mercurial > hg > truffle
changeset 22371:75c4ce3a352a
add range check to 5-parameter Source#createSection
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Mon, 16 Nov 2015 16:29:27 +0100 |
parents | 4b1005e85f94 |
children | 6598b9b7aafd |
files | truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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); }