Skip to content

Commit

Permalink
Merge pull request #92 from messai-engineering/YugaV63
Browse files Browse the repository at this point in the history
YugaV63 || SIOOB checks added
  • Loading branch information
sonali-anand-tc authored Apr 10, 2024
2 parents 40b0069 + 4b9a9fb commit 975799d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>in.messai</groupId>
<artifactId>yuga</artifactId>
<version>1.0.62</version>
<version>1.0.63</version>

<name>Yuga Date Parser</name>
<description>
Expand Down Expand Up @@ -188,7 +188,7 @@
<developerConnection>scm:git:[email protected]:messai-engineering/Yuga.git</developerConnection>
<url>https://github.com/messai-engineering/Yuga</url>

<tag>yuga-1.0.62</tag>
<tag>yuga-1.0.63</tag>

</scm>
</project>
6 changes: 5 additions & 1 deletion src/main/java/com/twelfthmile/yuga/Yuga.java
Original file line number Diff line number Diff line change
Expand Up @@ -1371,9 +1371,13 @@ else if (map.getType().equals(Constants.TY_NUMRANGE)) {

private static void setIfNumRange(String str, int i, FsaContextMap map) {
// TCANDROID-52501 - introduce bound checks
if((str.isEmpty() || str==null) || str.length()<i)
if((str.isEmpty() || str == null) || i < 0 || i > str.length())
return;
String trimmed = str.substring(0, i).trim();
// TCANDROID-54621 - SIOOB check
if (trimmed.isEmpty()) {
return;
}
// 18-22.
if(Util.isDelimiter(trimmed.charAt(trimmed.length()-1))){
trimmed = trimmed.substring(0,trimmed.length()-1);
Expand Down

0 comments on commit 975799d

Please sign in to comment.