New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun Jul 15 04:14:17 UTC 2018


Hi,

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

12 new defect(s) introduced to LibreOffice found with Coverity Scan.
6 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 12 of 12 defect(s)


** CID 1437962:    (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1761 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1789 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1881 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()


________________________________________________________________________________________________________
*** CID 1437962:    (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1761 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()
1755         }
1756         if (nSprm >= 0)
1757         {
1758             auto pValue
1759                 = new RTFValue((!bParam || nParam != 0) ? nSprm : NS_ooxml::LN_Value_ST_Underline_none);
1760             m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_Underline_val, pValue);
>>>     CID 1437962:    (RESOURCE_LEAK)
>>>     Variable "pBoolValue" going out of scope leaks the storage it points to.
1761             return RTFError::OK;
1762         }
1763     
1764         // Accent characters (over dot / over comma).
1765         switch (nKeyword)
1766         {
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1789 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()
1783                 break;
1784         }
1785         if (nSprm >= 0)
1786         {
1787             auto pValue = new RTFValue((!bParam || nParam != 0) ? nSprm : 0);
1788             m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_em, pValue);
>>>     CID 1437962:    (RESOURCE_LEAK)
>>>     Variable "pBoolValue" going out of scope leaks the storage it points to.
1789             return RTFError::OK;
1790         }
1791     
1792         // Trivial character sprms.
1793         switch (nKeyword)
1794         {
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1881 in writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword, bool, int)()
1875                 SAL_INFO("writerfilter.rtf",
1876                          "TODO handle toggle '" << keywordToString(nKeyword) << "'");
1877                 aSkip.setParsed(false);
1878             }
1879             break;
1880         }
>>>     CID 1437962:    (RESOURCE_LEAK)
>>>     Variable "pBoolValue" going out of scope leaks the storage it points to.
1881         return RTFError::OK;
1882     }
1883     
1884     RTFError RTFDocumentImpl::pushState()
1885     {
1886         //SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << " before push: " << m_pTokenizer->getGroup());

** CID 1437961:    (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 137 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 142 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 152 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 225 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 237 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 296 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 331 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 607 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 1606 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()


________________________________________________________________________________________________________
*** CID 1437961:    (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 137 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
131                         nValue = NS_ooxml::LN_Value_ST_Jc_center;
132                         break;
133                     case 2:
134                         nValue = NS_ooxml::LN_Value_ST_Jc_right;
135                         break;
136                 }
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Overwriting "pIntValue" in "pIntValue = new writerfilter::rtftok::RTFValue(nValue)" leaks the storage that "pIntValue" points to.
137                 pIntValue = new RTFValue(nValue);
138                 break;
139             }
140             case RTF_LEVELNFC:
141                 nSprm = NS_ooxml::LN_CT_Lvl_numFmt;
142                 pIntValue = new RTFValue(getNumberFormat(nParam));
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 142 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
136                 }
137                 pIntValue = new RTFValue(nValue);
138                 break;
139             }
140             case RTF_LEVELNFC:
141                 nSprm = NS_ooxml::LN_CT_Lvl_numFmt;
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Overwriting "pIntValue" in "pIntValue = new writerfilter::rtftok::RTFValue(writerfilter::getNumberFormat(nParam))" leaks the storage that "pIntValue" points to.
142                 pIntValue = new RTFValue(getNumberFormat(nParam));
143                 break;
144             case RTF_LEVELSTARTAT:
145                 nSprm = NS_ooxml::LN_CT_Lvl_start;
146                 break;
147             case RTF_LEVELPICTURE:
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 152 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
146                 break;
147             case RTF_LEVELPICTURE:
148                 nSprm = NS_ooxml::LN_CT_Lvl_lvlPicBulletId;
149                 break;
150             case RTF_SBASEDON:
151                 nSprm = NS_ooxml::LN_CT_Style_basedOn;
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Overwriting "pIntValue" in "pIntValue = new writerfilter::rtftok::RTFValue(rtl::OUString(this->getStyleName(nParam)), false)" leaks the storage that "pIntValue" points to.
152                 pIntValue = new RTFValue(getStyleName(nParam));
153                 break;
154             default:
155                 break;
156         }
157         if (nSprm > 0)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 225 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
219             putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm,
220                                pValue);
221             // Language is a character property, but we should store it at a paragraph level as well for fields.
222             if (nKeyword == RTF_LANG && m_bNeedPap)
223                 putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm,
224                                    pValue);
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Variable "pIntValue" going out of scope leaks the storage it points to.
225             return RTFError::OK;
226         }
227         // Trivial paragraph sprms.
228         switch (nKeyword)
229         {
230             case RTF_ITAP:
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 237 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
231                 nSprm = NS_ooxml::LN_tblDepth;
232                 // tdf#117268: If \itap0 is encountered inside tables (between \cellxN and \cell), then
233                 // use the default value (1), as Word apparently does
234                 if (nParam == 0 && (m_nTopLevelCells != 0 || m_nNestedCells != 0))
235                 {
236                     nParam = 1;
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Overwriting "pIntValue" in "pIntValue = new writerfilter::rtftok::RTFValue(nParam)" leaks the storage that "pIntValue" points to.
237                     pIntValue = new RTFValue(nParam);
238                 }
239                 break;
240             default:
241                 break;
242         }
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 296 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
290             }
291             break;
292             default:
293                 break;
294         }
295         if (nSprm > 0)
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Variable "pIntValue" going out of scope leaks the storage it points to.
296             return RTFError::OK;
297     
298         // Frame size / position.
299         Id nId = 0;
300         switch (nKeyword)
301         {
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 331 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
325         {
326             m_bNeedPap = true;
327             // Don't try to support text frames inside tables for now.
328             if (m_aStates.top().pCurrentBuffer != &m_aTableBufferStack.back())
329                 m_aStates.top().aFrame.setSprm(nId, nParam);
330     
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Variable "pIntValue" going out of scope leaks the storage it points to.
331             return RTFError::OK;
332         }
333     
334         // Then check for the more complex ones.
335         switch (nKeyword)
336         {
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 607 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
601             {
602                 // This is similar to RTF_ABSH, negative value means 'exact', positive means 'at least'.
603                 auto pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_atLeast);
604                 if (nParam < 0)
605                 {
606                     pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_exact);
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Overwriting "pIntValue" in "pIntValue = new writerfilter::rtftok::RTFValue(-nParam)" leaks the storage that "pIntValue" points to.
607                     pIntValue = new RTFValue(-nParam);
608                 }
609                 m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_lineRule, pValue);
610                 m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_line, pIntValue);
611             }
612             break;
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 1606 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
1600             {
1601                 SAL_INFO("writerfilter", "TODO handle value '" << keywordToString(nKeyword) << "'");
1602                 aSkip.setParsed(false);
1603             }
1604             break;
1605         }
>>>     CID 1437961:    (RESOURCE_LEAK)
>>>     Variable "pIntValue" going out of scope leaks the storage it points to.
1606         return RTFError::OK;
1607     }
1608     
1609     } // namespace rtftok
1610     } // namespace writerfilter
1611     

** CID 1437960:  Resource leaks  (CTOR_DTOR_LEAK)
/sfx2/source/dialog/tabdlg.cxx: 1461 in SfxTabDialogController::SfxTabDialogController(weld::Window *, const rtl::OUString &, const rtl::OString &, const SfxItemSet *)()


________________________________________________________________________________________________________
*** CID 1437960:  Resource leaks  (CTOR_DTOR_LEAK)
/sfx2/source/dialog/tabdlg.cxx: 1461 in SfxTabDialogController::SfxTabDialogController(weld::Window *, const rtl::OUString &, const rtl::OString &, const SfxItemSet *)()
1455         , m_xTabCtrl(m_xBuilder->weld_notebook("tabcontrol"))
1456         , m_xOKBtn(m_xBuilder->weld_button("ok"))
1457         , m_xApplyBtn(m_xBuilder->weld_button("apply"))
1458         , m_xUserBtn(m_xBuilder->weld_button("user"))
1459         , m_xCancelBtn(m_xBuilder->weld_button("cancel"))
1460         , m_xResetBtn(m_xBuilder->weld_button("reset"))
>>>     CID 1437960:  Resource leaks  (CTOR_DTOR_LEAK)
>>>     Allocating memory by calling "new SfxItemSet(pItemSet)".
1461         , m_pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
1462         , m_pOutSet(nullptr)
1463         , m_pRanges(nullptr)
1464     {
1465         m_pImpl.reset(new TabDlg_Impl(m_xTabCtrl->get_n_pages()));
1466         m_pImpl->bHideResetBtn = !m_xResetBtn->get_visible();

** CID 1437959:  Security best practices violations  (STRING_OVERFLOW)
/libreofficekit/qa/tilebench/tilebench.cxx: 318 in main()


________________________________________________________________________________________________________
*** CID 1437959:  Security best practices violations  (STRING_OVERFLOW)
/libreofficekit/qa/tilebench/tilebench.cxx: 318 in main()
312             pre_init = true;
313             mode = argv[arg++];
314         }
315     
316         char user_url[8046];;
317         strcpy(user_url, "file:///");
>>>     CID 1437959:  Security best practices violations  (STRING_OVERFLOW)
>>>     You might overrun the 8046-character fixed-size string "user_url" by copying "argv[1]" without checking the length.
318         strcat(user_url, argv[1]);
319         strcat(user_url, "../user");
320     
321         if (pre_init)
322         {
323             aTimes.emplace_back("pre-initialization");

** CID 1437958:  Uninitialized members  (UNINIT_CTOR)
/oox/source/crypto/CryptTools.cxx: 140 in oox::core::CryptoImpl::CryptoImpl()()


________________________________________________________________________________________________________
*** CID 1437958:  Uninitialized members  (UNINIT_CTOR)
/oox/source/crypto/CryptTools.cxx: 140 in oox::core::CryptoImpl::CryptoImpl()()
134             : mContext(nullptr)
135             , mSecParam(nullptr)
136             , mSymKey(nullptr)
137         {
138             // Initialize NSS, database functions are not needed
139             NSS_NoDB_Init(nullptr);
>>>     CID 1437958:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "mpSlot" is not initialized in this constructor nor in any functions that it calls.
140         }
141     
142         ~CryptoImpl()
143         {
144             if (mContext)
145                 PK11_DestroyContext(mContext, PR_TRUE);

** CID 1437957:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1437957:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export2.cxx: 321 in testTdf70838b_verticalRotation::verify()()
315         CPPUNIT_ASSERT(aRect.GetHeight() > aRect.GetWidth());
316     }
317     
318     DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotation.odt")
319     {
320         SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
>>>     CID 1437957:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pTextDoc" to "GetDocShell", which dereferences it.
321         SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
322         SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
323         tools::Rectangle aGroupShape = pPage->GetObj(0)->GetSnapRect();
324         tools::Rectangle aLine = pPage->GetObj(2)->GetSnapRect();
325     
326         CPPUNIT_ASSERT_MESSAGE("Smiley faces are round", aGroupShape.GetHeight() > aGroupShape.GetWidth());

** CID 1437956:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/outlnvsh.cxx: 1601 in sd::OutlineViewShell::UpdateTitleObject(SdPage *, const Paragraph *)()


________________________________________________________________________________________________________
*** CID 1437956:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/outlnvsh.cxx: 1601 in sd::OutlineViewShell::UpdateTitleObject(SdPage *, const Paragraph *)()
1595             std::unique_ptr<OutlinerParaObject> pOPO;
1596             if (pTO)
1597                 pOPO = rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1);
1598             if (pOPO)
1599             {
1600                 pOPO->SetOutlinerMode( OutlinerMode::TitleObject );
>>>     CID 1437956:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pTO" to "IsVerticalWriting", which dereferences it. (The dereference happens because this is a virtual function call.)
1601                 pOPO->SetVertical( pTO->IsVerticalWriting() );
1602                 if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
1603                 {
1604                     // do nothing, same text already set
1605                 }
1606                 else

** CID 1437955:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1108 in writerfilter::rtftok::RTFDocumentImpl::resolvePict(bool, const com::sun::star::uno::Reference<com::sun::star::drawing::XShape> &)()


________________________________________________________________________________________________________
*** CID 1437955:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1108 in writerfilter::rtftok::RTFDocumentImpl::resolvePict(bool, const com::sun::star::uno::Reference<com::sun::star::drawing::XShape> &)()
1102     
1103             aAnchorSprms.set(NS_ooxml::LN_CT_Anchor_docPr, pDocprValue);
1104             aAnchorSprms.set(NS_ooxml::LN_graphic_graphic, pGraphicValue);
1105             // anchor sprm
1106             auto pValue = new RTFValue(m_aStates.top().aShape.aAnchorAttributes, aAnchorSprms);
1107             aSprms.set(NS_ooxml::LN_anchor_anchor, pValue);
>>>     CID 1437955:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "pAnchorWrapValue" going out of scope leaks the storage it points to.
1108         }
1109         writerfilter::Reference<Properties>::Pointer_t pProperties
1110             = new RTFReferenceProperties(aAttributes, aSprms);
1111         checkFirstRun();
1112     
1113         if (!m_aStates.top().pCurrentBuffer)

** CID 1437954:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1437954:  Null pointer dereferences  (NULL_RETURNS)
/svtools/source/contnr/svimpbox.cxx: 1079 in SvImpLBox::DrawNet(OutputDevice &)()
1073     
1074                 aPos1.setY( nY );
1075                 aPos1.AdjustY(nEntryHeightDIV2 );
1076     
1077                 pChild = pView->FirstChild( pEntry );
1078                 DBG_ASSERT(pChild,"Child?");
>>>     CID 1437954:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "pChild" when calling "LastSibling".
1079                 pChild = pChild->LastSibling();
1080                 nDistance = static_cast<sal_uInt16>(pView->GetVisiblePos(pChild) - pView->GetVisiblePos(pEntry));
1081                 aPos2 = aPos1;
1082                 aPos2.AdjustY(nDistance * nEntryHeight );
1083                 rRenderContext.DrawLine(aPos1, aPos2);
1084             }

** CID 1437953:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1437953:  Null pointer dereferences  (FORWARD_NULL)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 3136 in GtkInstanceMenuButton::set_popover(weld::Widget *)()
3130             signal_selected(OString(pStr, pStr ? strlen(pStr) : 0));
3131         }
3132     
3133         virtual void set_popover(weld::Widget* pPopover) override
3134         {
3135             GtkInstanceWidget* pPopoverWidget = dynamic_cast<GtkInstanceWidget*>(pPopover);
>>>     CID 1437953:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pPopoverWidget" to "getWidget", which dereferences it.
3136             m_pPopover = pPopoverWidget->getWidget();
3137             if (m_pMenuHack)
3138             {
3139                 gtk_menu_button_set_popover(m_pMenuButton, gtk_popover_new(GTK_WIDGET(m_pMenuButton)));
3140             }
3141             else

** CID 1437952:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 606 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()


________________________________________________________________________________________________________
*** CID 1437952:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 606 in writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword, int)()
600             case RTF_SL:
601             {
602                 // This is similar to RTF_ABSH, negative value means 'exact', positive means 'at least'.
603                 auto pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_atLeast);
604                 if (nParam < 0)
605                 {
>>>     CID 1437952:  Resource leaks  (RESOURCE_LEAK)
>>>     Overwriting "pValue" in "pValue = new writerfilter::rtftok::RTFValue(91956)" leaks the storage that "pValue" points to.
606                     pValue = new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_exact);
607                     pIntValue = new RTFValue(-nParam);
608                 }
609                 m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_lineRule, pValue);
610                 m_aStates.top().aParagraphAttributes.set(NS_ooxml::LN_CT_Spacing_line, pIntValue);
611             }

** CID 1437951:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1536 in writerfilter::rtftok::RTFDocumentImpl::prepareProperties(writerfilter::rtftok::RTFParserState &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, int, int)()


________________________________________________________________________________________________________
*** CID 1437951:  Resource leaks  (RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1536 in writerfilter::rtftok::RTFDocumentImpl::prepareProperties(writerfilter::rtftok::RTFParserState &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, tools::SvRef<writerfilter::Reference<writerfilter::Properties>> &, int, int)()
1530             putNestedSprm(rState.aTableRowSprms, NS_ooxml::LN_CT_TblPrBase_tblCellMar,
1531                           NS_ooxml::LN_CT_TblCellMar_right, new RTFValue(aAttributes));
1532         }
1533     
1534         o_rpTableRowProperties
1535             = new RTFReferenceProperties(rState.aTableRowAttributes, rState.aTableRowSprms);
>>>     CID 1437951:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "pRowValue" going out of scope leaks the storage it points to.
1536     }
1537     
1538     void RTFDocumentImpl::sendProperties(
1539         writerfilter::Reference<Properties>::Pointer_t const& pParagraphProperties,
1540         writerfilter::Reference<Properties>::Pointer_t const& pFrameProperties,
1541         writerfilter::Reference<Properties>::Pointer_t const& pTableRowProperties)


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpypct4AG52QGzZrOuPqlYDV2pTsg-2FcgePjRT2A983CDzrTN137t337bBh8XmqwJsHyb0M59mhIYZqamJZmvJjVCjh-2BTmpSuG-2FMQGK8qQ2zN3dq-2BLfZDxha3gW2shhmWugD8O0K6erzIfIn4-2FYbW8FDaPbzF-2FfZnguSMkIZ5tAmero-3D



More information about the LibreOffice mailing list