mirror of
https://github.com/corda/corda.git
synced 2025-06-14 13:18:18 +00:00
Fixed possible ArrayIndexOutOfBounds exception
This commit is contained in:
@ -45,7 +45,7 @@ public class BufferedReader extends Reader {
|
|||||||
if (buffer[i] == '\n' || buffer[i] == '\r') {
|
if (buffer[i] == '\n' || buffer[i] == '\r') {
|
||||||
sb.append(buffer, position, i - position);
|
sb.append(buffer, position, i - position);
|
||||||
position = i + 1;
|
position = i + 1;
|
||||||
if(buffer[i+1] != null && buffer[i+1] == '\n') {
|
if(i+1 < limit && buffer[i+1] == '\n') {
|
||||||
position = i + 1;
|
position = i + 1;
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
Reference in New Issue
Block a user