New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Jun 19 15:21:39 UTC 2018
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
4 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 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 4 of 4 defect(s)
** CID 1437410: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1437410: Null pointer dereferences (FORWARD_NULL)
/sw/source/core/docnode/ndtbl1.cxx: 93 in SwTableFormatCmp::~SwTableFormatCmp()()
87 }
88
89 SwTableFormatCmp::~SwTableFormatCmp()
90 {
91 if (pOld)
92 pOld->Remove(this);
>>> CID 1437410: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "this->pOld" to "HasWriterListeners", which dereferences it.
93 if (!pOld->HasWriterListeners())
94 delete pOld;
95 }
96
97 // static
98 SwFrameFormat* SwTableFormatCmp::FindNewFormat(std::vector<std::unique_ptr<SwTableFormatCmp>>& rArr,
** CID 1437409: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1437409: Null pointer dereferences (FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export2.cxx: 311 in testTdf70838::verify()()
305 CPPUNIT_ASSERT(xText->getSize().Width > 11000);
306 }
307
308 DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt")
309 {
310 SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
>>> CID 1437409: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pTextDoc" to "GetDocShell", which dereferences it.
311 SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
312 SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
313 tools::Rectangle aRect = pPage->GetObj(0)->GetSnapRect();
314 CPPUNIT_ASSERT( aRect.GetHeight() > aRect.GetWidth() );
315 }
316
** CID 1437408: Uninitialized members (UNINIT_CTOR)
/svx/source/dialog/paraprev.cxx: 221 in ParaPrevWindow::ParaPrevWindow()()
________________________________________________________________________________________________________
*** CID 1437408: Uninitialized members (UNINIT_CTOR)
/svx/source/dialog/paraprev.cxx: 221 in ParaPrevWindow::ParaPrevWindow()()
215 nLeftMargin ( 0 ),
216 nRightMargin ( 0 ),
217 eAdjust ( SvxAdjust::Left ),
218 eLastLine ( SvxAdjust::Left )
219 {
220 aSize = Size(11905, 16837);
>>> CID 1437408: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "eLine" is not initialized in this constructor nor in any functions that it calls.
221 }
222
223 void ParaPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
224 {
225 Size aOptimalSize(getParagraphPreviewOptimalSize(pDrawingArea->get_ref_device()));
226 pDrawingArea->set_size_request(aOptimalSize.Width(), aOptimalSize.Height());
** CID 1437407: FindBugs: Malicious code vulnerability (FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java: 48 in com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(java.lang.ClassLoader, java.net.URL[])()
________________________________________________________________________________________________________
*** CID 1437407: FindBugs: Malicious code vulnerability (FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java: 48 in com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(java.lang.ClassLoader, java.net.URL[])()
42
43 return getURLClassLoader(parent, classPath);
44 }
45
46 public static ClassLoader getURLClassLoader(ClassLoader parent,
47 URL[] classpath) {
>>> CID 1437407: FindBugs: Malicious code vulnerability (FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
>>> com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(ClassLoader, URL[]) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block.
48 return new URLClassLoader(classpath, parent);
49 }
________________________________________________________________________________________________________
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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyNgRalQv3-2FPxLwxoPwdptXUkrgux6lWK0ySo6MMNEMfyGqRgmlJgXMUazIz9n8K0ijKKqkJnThuSiipn71UXVFr-2FeReUAvK0DQGzsIq724PAjaKbImO-2FouklEnRLcrG2ntgnD-2BYU9x-2BfjN66PkUQTWBBWVQ3ditBQK8HLoGDJ78o-3D
More information about the LibreOffice
mailing list