Bug 1611708 statusOffset is uninitialized in one execution path. draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 23 May 2022 03:03:50 +0900
changeset 116803 3bf6d65fe2cf0083d34f051d59ea8ccb620c70d1
parent 116802 a63ac62f591bc5360c89a6bf8e702daae094f76a
child 116804 b48fe6f52a795abf23cd6b4fc245341ca037309d
push id15955
push userishikawa@yk.rim.or.jp
push dateSun, 22 May 2022 18:04:18 +0000
treeherdertry-comm-central@beaacca97fbd [default view] [failures only]
bugs1611708
Bug 1611708 statusOffset is uninitialized in one execution path.
mailnews/base/src/nsMsgFolderCompactor.cpp
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -1205,16 +1205,22 @@ NS_IMETHODIMP
 nsOfflineStoreCompactState::OnDataAvailable(nsIRequest* request,
                                             nsIInputStream* inStr,
                                             uint64_t sourceOffset,
                                             uint32_t count) {
   if (!m_fileStream || !inStr) return NS_ERROR_FAILURE;
 
   nsresult rv = NS_OK;
 
+#ifdef DEBUG
+  // m_startOfMsg is bool
+  fprintf(stderr, "{debug} OnDataAvailable\n"
+          "m_starOfMsg = %02x\n" , m_startOfMsg);
+#endif
+
   if (m_startOfMsg) {
     m_offlineMsgSize = 0;
     m_messageUri.Truncate();  // clear the previous message uri
     if (NS_SUCCEEDED(BuildMessageURI(m_baseMessageUri.get(), m_keys[m_curIndex],
                                      m_messageUri))) {
       rv = m_messageService->MessageURIToMsgHdr(m_messageUri,
                                                 getter_AddRefs(m_curSrcHdr));
       NS_ENSURE_SUCCESS(rv, rv);