Bug 610465, crash @ nsImapServerResponseParser::ParseIMAPServerResponse, r=mkmelin
authorR Kent James <rkent@caspia.com>
Wed, 16 Mar 2016 10:01:42 -0700
changeset 24689 4cdf4ffd43e0f85b27b7b8f3fa529b62424904dd
parent 24688 73edb3ab0b80323e007490b73bab4cfaaf9af961
child 24690 eb9570adfe513b7a064551235bb187cf3042cc21
push id1657
push userclokep@gmail.com
push dateMon, 06 Jun 2016 19:50:21 +0000
treeherdercomm-beta@9fac989284b5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs610465
Bug 610465, crash @ nsImapServerResponseParser::ParseIMAPServerResponse, r=mkmelin
mailnews/imap/src/nsImapServerResponseParser.cpp
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -236,17 +236,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();