File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
src/main/java/org/truffleruby/core/support Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ Bug fixes:
37
37
* Fixed ` #inspect ` on broken UTF-8 sequences (#1842 , @chrisseaton ).
38
38
* ` Truffle::Interop.keys ` should report methods of String and Symbol (#1817 )
39
39
* ` Kernel#sprintf ` encoding validity has been fixed (#1852 , @XrXr ).
40
+ * Fixed File.fnmatch causes ArrayIndexOutOfBoundsException (#1845 ).
40
41
41
42
Compatibility:
42
43
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ public static int fnmatch(
304
304
}
305
305
}
306
306
/* failed : try next recursion */
307
- if (ptmp != -1 && stmp != -1 && !(period && string [stmp ] == '.' )) {
307
+ if (ptmp != -1 && stmp != -1 && !(period && stmp < string . length && string [stmp ] == '.' )) {
308
308
stmp = nextSlashIndex (string , stmp , send );
309
309
if (stmp < send ) {
310
310
pat_pos = ptmp ;
You can’t perform that action at this time.
0 commit comments