Fwd: New Defects reported by Coverity Scan for Thunderbird

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: New Defects reported by Coverity Scan for Thunderbird

ISHIKAWA,chiaki
It has been a while since the last time Coverity found problems in
TB-specific code (well, I am in the middle of PC hardware issue so I may
have missed other relevant coverity e-mail in the last 15 days or so.).


But all the problems reported in the following e-mail seem to be related
to TB and worth investigating.

I am sending this to development list just in case pertinent people are
not receiving this e-mail.



-------- Forwarded Message --------
Subject: New Defects reported by Coverity Scan for Thunderbird
Date: Wed, 24 Oct 2018 02:48:47 +0000 (UTC)
From: [hidden email]
To: [hidden email]



Hi,

Please find the latest report on new defect(s) introduced to Thunderbird found with Coverity Scan.

6 new defect(s) introduced to Thunderbird found with Coverity Scan.
3655 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 6 of 6 defect(s)


** CID 1438989:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1438989:  Null pointer dereferences  (FORWARD_NULL)
/comm/mailnews/compose/src/nsMsgCompUtils.cpp: 1100 in LegacyParmFolding(const nsTString<char> &, const nsTString<char> &, int)()
1094         encodedRealName = (char *) PR_Malloc(aFileName.Length() + 1);
1095         if (encodedRealName)
1096           PL_strcpy(encodedRealName, aFileName.get());
1097       }
1098
1099       // Now put backslashes before special characters per RFC 822
>>>     CID 1438989:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "encodedRealName" to "msg_make_filename_qtext", which dereferences it.
1100       char *qtextName =
1101         msg_make_filename_qtext(encodedRealName, aParmFolding == 0);
1102       if (qtextName) {
1103         PR_FREEIF(encodedRealName);
1104         encodedRealName = qtextName;
1105       }

** CID 1421050:    (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1421050:    (FORWARD_NULL)
/comm/mailnews/mime/src/mimedrft.cpp: 1392 in mime_parse_stream_complete(_nsMIMESession *)()
1386               news_host = PR_smprintf ("news://%s", host);
1387             }
1388           }
1389         }
1390
1391
>>>     CID 1421050:    (FORWARD_NULL)
>>>     Passing null pointer "mdd->mailcharset" to "CreateCompositionFields", which dereferences it.
1392         CreateCompositionFields(from, repl, to, cc, bcc, fcc, grps, foll,
1393           org, subj, refs, priority, news_host,
1394           mdd->mailcharset,
1395           getter_AddRefs(fields));
1396
1397         contentLanguage = MimeHeaders_get(mdd->headers, HEADER_CONTENT_LANGUAGE, false, false);
/comm/mailnews/mime/src/mimedrft.cpp: 1768 in mime_parse_stream_complete(_nsMIMESession *)()
1762             }
1763           }
1764         }
1765       }
1766       else
1767       {
>>>     CID 1421050:    (FORWARD_NULL)
>>>     Passing null pointer "mdd->mailcharset" to "CreateCompositionFields", which dereferences it.
1768         CreateCompositionFields(from, repl, to, cc, bcc, fcc, grps, foll,
1769           org, subj, refs, priority, news_host,
1770           mdd->mailcharset,
1771           getter_AddRefs(fields));
1772         if (fields)
1773           CreateTheComposeWindow(fields, newAttachData, nsIMsgCompType::New, nsIMsgCompFormat::Default, mdd->identity, nullptr, mdd->origMsgHdr);

** CID 1260149:  Resource leaks  (RESOURCE_LEAK)
/comm/mailnews/base/search/src/nsMsgFilterList.cpp: 800 in nsMsgFilterList::ParseCondition(nsIMsgFilter *, const char *)()


________________________________________________________________________________________________________
*** CID 1260149:  Resource leaks  (RESOURCE_LEAK)
/comm/mailnews/base/search/src/nsMsgFilterList.cpp: 800 in nsMsgFilterList::ParseCondition(nsIMsgFilter *, const char *)()
794               if (!(*to++ = *from++)) break;
795             }
796             newTerm->m_booleanOp = (ANDTerm) ? nsMsgSearchBooleanOp::BooleanAND
797                                              : nsMsgSearchBooleanOp::BooleanOR;
798
799             err = newTerm->DeStreamNew(termDup, PL_strlen(termDup));
>>>     CID 1260149:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "newTerm" going out of scope leaks the storage it points to.
800             NS_ENSURE_SUCCESS(err, err);
801             aFilter->AppendTerm(newTerm);
802           }
803           PR_FREEIF(termDup);
804         }
805         else

** CID 1260145:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1260145:  Null pointer dereferences  (FORWARD_NULL)
/comm/mailnews/imap/src/nsImapProtocol.cpp: 7032 in nsImapProtocol::RenameHierarchyByHand(const char *, const char *)()
7026
7027             // calculate the new name and do the rename
7028             nsCString newChildName(newParentMailboxName);
7029             newChildName += (currentName + PL_strlen(oldParentMailboxName));
7030             // Pass in 'nonHierarchicalRename' to determine if we should really
7031             // reanme, or just move subscriptions.
>>>     CID 1260145:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "currentName" to "RenameMailboxRespectingSubscriptions", which dereferences it.
7032             renameSucceeded =
7033               RenameMailboxRespectingSubscriptions(currentName,
7034                                                    newChildName.get(),
7035                                                    nonHierarchicalRename);
7036             PR_FREEIF(currentName);
7037         }

** CID 1137452:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1137452:  Null pointer dereferences  (NULL_RETURNS)
/comm/mailnews/mime/src/mimemoz2.cpp: 178 in ProcessBodyAsAttachment(MimeObject *, nsMsgAttachmentData **)()
172           rv = nsMimeNewURI(getter_AddRefs(tmp->m_url), tmpURL, nullptr);
173         }
174         else
175         {
176           // This is just a normal MIME part as usual.
177           tmpURL = mime_set_url_part(url, id, true);
>>>     CID 1137452:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "tmpURL" when calling "nsMimeNewURI".
178           rv = nsMimeNewURI(getter_AddRefs(tmp->m_url), tmpURL, nullptr);
179         }
180
181         if (!tmp->m_url || NS_FAILED(rv))
182         {
183           delete [] *data;

** CID 450527:  Resource leaks  (RESOURCE_LEAK)
/comm/mailnews/imap/src/nsImapServerResponseParser.cpp: 2460 in nsImapServerResponseParser::namespace_data()()


________________________________________________________________________________________________________
*** CID 450527:  Resource leaks  (RESOURCE_LEAK)
/comm/mailnews/imap/src/nsImapServerResponseParser.cpp: 2460 in nsImapServerResponseParser::namespace_data()()
2454
2455                 bool endOfThisNamespaceType = (fNextToken[0] == ')');
2456                 if (!endOfThisNamespaceType && fNextToken[0] != '(')  // no space between namespaces of the same type
2457                 {
2458                   SetSyntaxError(true);
2459                 }
>>>     CID 450527:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "newNamespace" going out of scope leaks the storage it points to.
2460               }
2461               PR_Free(namespacePrefix);
2462             }
2463           }
2464         }
2465         else


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRatup6zBAYCo6Ce1pvzy9Ee4qJmmCCWyFXH3Z-2BjWgNDpqveTGE00b-2Bxq7Gpp7vXFD4-3D_WSCScGnjaXfWLguY5PmVmVThPPMEXWbu-2Brq6btJ6DAZoGz1-2F6GEOe4rKCTLUzRruIORn-2BiTuwCJnpfUnE079Yf9oJtK9Vy7-2FkIxw8NDegglFyldFasEXArPnI9LbVyycuTKq6a1b7mAxu6BcRga-2BUx2qmurC8oQULGIrkitmoui2Yhy5z5RbAqpCAn6ZzLjihEgJx2o0wulDq40dHLcZP5TI24aHx-2BEQL9Xv88DChKY-3D

   To manage Coverity Scan email notifications for "[hidden email]", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4E9B3IyaNM01-2FCNIiiGMkjrV7Z7TdO4tvOhPf3CXmRuI4Pp0Of2houCnEW2fStUw09RkbYbTA3bf67c4q8dE8GU6P5K7HnX3H5UDBTNzLBXY-3D_WSCScGnjaXfWLguY5PmVmVThPPMEXWbu-2Brq6btJ6DAZoGz1-2F6GEOe4rKCTLUzRruNXchxD-2Fyidpa79jcsBeEcVg4z-2BvkUDAVk35Ju16XupahLBCe7ktAJs5xsLE-2FbOnUqMJDCs7gld71JYALYcJFNCvd8ftJENsZXqKPURLmIFYuk4oRIq7Nqpf3u0-2FHsf05yVaVZVsX3Zjw2t4g7nR1zNj4RUbI3eLpL0UQYLWH264-3D



_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird