Bug 610465, crash @ nsImapServerResponseParser::ParseIMAPServerResponse, r=mkmelin a=rkent
authorR Kent James <rkent@caspia.com>
Wed, 16 Mar 2016 10:01:42 -0700
changeset 22259 66db30aed2d9
parent 22258 72d1dfcc6d46
child 22260 15deea4c4d39
push id101
push userkent@caspia.com
push dateFri, 29 Apr 2016 20:46:04 +0000
treeherdercomm-esr38@66db30aed2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs610465
Bug 610465, crash @ nsImapServerResponseParser::ParseIMAPServerResponse, r=mkmelin a=rkent
mailnews/imap/src/nsImapServerResponseParser.cpp
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -235,17 +235,17 @@ void nsImapServerResponseParser::ParseIM
           response_tagged();
 
       } while (ContinueParse() && !inIdle && (numberOfTaggedResponsesReceived < fNumberOfTaggedResponsesExpected));
 
       // check and see if the server is waiting for more input
       // it's possible that we ate this + while parsing certain responses (like cram data),
       // in these cases, the parsing routine for that specific command will manually set
       // fWaitingForMoreClientInput so we don't lose that information....
-      if (*fNextToken == '+' || inIdle)
+      if (fNextToken && (*fNextToken == '+') || inIdle)
       {
         fWaitingForMoreClientInput = true;
       }
       // if we aren't still waiting for more input....
       else if (!fWaitingForMoreClientInput && !aGreetingWithCapability)
       {
         if (ContinueParse())
           response_done();