Merge "Correctly fix an outOfBounds error" into jb-ub-mail-ur10

This commit is contained in:
Martin Hibdon 2013-08-28 23:37:17 +00:00 committed by Android (Google) Code Review
commit f1e3a72d62
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);