Bug 610465, crash @ nsImapServerResponseParser::ParseIMAPServerResponse, r=mkmelin a=rkent
authorR Kent James <rkent@caspia.com>
Wed, 16 Mar 2016 10:01:42 -0700
changeset 26813 d6fcf3c1deb1621a08cf9e11bda9d585a8bcd45c
parent 26812 d57ad7bee5d1bf8cb90ec9f3713154826ad954e1
child 26814 c45514a56b282744d5c9e593945faa3b4fcf44dc
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [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
@@ -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();