am 9adf186c: Catch negative literal sizes in imap responses

* commit '9adf186c5b6843b72d6768e4604768f39abe8467':
  Catch negative literal sizes in imap responses
This commit is contained in:
Jay Shrauner 2014-07-16 19:17:20 +00:00 committed by Android Git Automerger
commit c3dabb5230

View File

@ -438,6 +438,9 @@ public class ImapResponseParser {
} catch (NumberFormatException nfe) {
throw new MessagingException("Invalid length in literal");
}
if (size < 0) {
throw new MessagingException("Invalid negative length in literal");
}
expect('\r');
expect('\n');
FixedLengthInputStream in = new FixedLengthInputStream(mIn, size);