Correctly fix an outOfBounds error

b/10380970

Change-Id: I58a57c7a659bb92ba6b6dbf0cbb099d0d252cc37
This commit is contained in:
Martin Hibdon 2013-08-28 16:22:09 -07:00
parent 466eb2dcd2
commit 35957ffcf6
1 changed files with 2 additions and 2 deletions

View File

@ -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);