Correctly fix an outOfBounds error
b/10380970 Change-Id: I58a57c7a659bb92ba6b6dbf0cbb099d0d252cc37
This commit is contained in:
parent
466eb2dcd2
commit
35957ffcf6
|
@ -584,12 +584,12 @@ public class Pop3Store extends Store {
|
|||
if (ok > 0) {
|
||||
try {
|
||||
int start = ok + 3;
|
||||
int end = response.indexOf(" ", start);
|
||||
if (start < response.length()) {
|
||||
if (start > response.length()) {
|
||||
// No length was supplied, this is a protocol error.
|
||||
LogUtils.e(Logging.LOG_TAG, "No body length supplied");
|
||||
message.setSize(0);
|
||||
} else {
|
||||
int end = response.indexOf(" ", start);
|
||||
final String intString;
|
||||
if (end > 0) {
|
||||
intString = response.substring(start, end);
|
||||
|
|
Loading…
Reference in New Issue