New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

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


** CID 1474403:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/undo/rolbck.cxx: 152 in SwHistorySetFormat::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474403:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/undo/rolbck.cxx: 152 in SwHistorySetFormat::dumpAsXml(_xmlTextWriter *) const()
146         return aResult;
147     }
148     
149     void SwHistorySetFormat::dumpAsXml(xmlTextWriterPtr pWriter) const
150     {
151         xmlTextWriterStartElement(pWriter, BAD_CAST("SwHistorySetFormat"));
>>>     CID 1474403:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteAttribute(pWriter, (xmlChar *)"m_nNodeIndex", (xmlChar *)rtl::OString::number(this->m_nNodeIndex, 10).getStr())" without checking return value. This library function may fail and return an error code.
152         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nNodeIndex"),
153                                     BAD_CAST(OString::number(m_nNodeIndex).getStr()));
154         SwHistoryHint::dumpAsXml(pWriter);
155     
156         if (m_pAttr)
157         {

** CID 1474402:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 236 in <unnamed>::dumpFillTransparenceGradientNameAsAttribute(std::basic_string_view<char16_t, std::char_traits<char16_t>>, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474402:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 236 in <unnamed>::dumpFillTransparenceGradientNameAsAttribute(std::basic_string_view<char16_t, std::char_traits<char16_t>>, _xmlTextWriter *)()
230     {
231         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparence"), "%" SAL_PRIdINT32, aTransparence);
232     }
233     
234     void dumpFillTransparenceGradientNameAsAttribute(std::u16string_view sTranspGradName, xmlTextWriterPtr xmlWriter)
235     {
>>>     CID 1474402:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"fillTransparenceGradientName", "%s", rtl::OString(rtl::OUStringToOString(sTranspGradName, 76, 1382U)).getStr())" without checking return value. This library function may fail and return an error code.
236         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
237             OUStringToOString(sTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
238     }
239     
240     //because there's more awt::Gradient properties to dump
241     void dumpGradientProperty(const awt::Gradient& rGradient, xmlTextWriterPtr xmlWriter)

** CID 1474401:  Error handling issues  (CHECKED_RETURN)
/svl/source/undo/undo.cxx: 1367 in SfxListUndoAction::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474401:  Error handling issues  (CHECKED_RETURN)
/svl/source/undo/undo.cxx: 1367 in SfxListUndoAction::dumpAsXml(_xmlTextWriter *) const()
1361         return !maUndoActions.empty() && maUndoActions[maUndoActions.size()-1].pAction->Merge( pNextAction );
1362     }
1363     
1364     void SfxListUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) const
1365     {
1366         xmlTextWriterStartElement(pWriter, BAD_CAST("SfxListUndoAction"));
>>>     CID 1474401:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteAttribute(pWriter, (xmlChar *)"size", (xmlChar *)rtl::OString::number(this->maUndoActions.size(), 10).getStr())" without checking return value. This library function may fail and return an error code.
1367         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("size"), BAD_CAST(OString::number(maUndoActions.size()).getStr()));
1368         SfxUndoAction::dumpAsXml(pWriter);
1369     
1370         for (size_t i = 0; i < maUndoActions.size(); ++i)
1371             maUndoActions[i].pAction->dumpAsXml(pWriter);
1372     

** CID 1474400:  Error handling issues  (CHECKED_RETURN)
/svl/source/items/stritem.cxx: 31 in SfxStringItem::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474400:  Error handling issues  (CHECKED_RETURN)
/svl/source/items/stritem.cxx: 31 in SfxStringItem::dumpAsXml(_xmlTextWriter *) const()
25     {
26         return new SfxStringItem(*this);
27     }
28     
29     void SfxStringItem::dumpAsXml(xmlTextWriterPtr pWriter) const
30     {
>>>     CID 1474400:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterStartElement(pWriter, (xmlChar *)"SfxStringItem")" without checking return value. This library function may fail and return an error code.
31         xmlTextWriterStartElement(pWriter, BAD_CAST("SfxStringItem"));
32         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
33         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr()));
34         xmlTextWriterEndElement(pWriter);
35     }
36     

** CID 1474399:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/EnhancedShapeDumper.cxx: 346 in EnhancedShapeDumper::dumpOriginAsElement(const com::sun::star::drawing::EnhancedCustomShapeParameterPair &)()


________________________________________________________________________________________________________
*** CID 1474399:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/EnhancedShapeDumper.cxx: 346 in EnhancedShapeDumper::dumpOriginAsElement(const com::sun::star::drawing::EnhancedCustomShapeParameterPair &)()
340         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionZ"), "%f", aViewPoint.PositionZ);
341         xmlTextWriterEndElement( xmlWriter );
342     }
343     
344     void EnhancedShapeDumper::dumpOriginAsElement(const drawing::EnhancedCustomShapeParameterPair& aOrigin)
345     {
>>>     CID 1474399:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterStartElement(this->xmlWriter, (xmlChar *)"Origin")" without checking return value. This library function may fail and return an error code.
346         xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Origin" ));
347         dumpEnhancedCustomShapeParameterPair(aOrigin);
348         xmlTextWriterEndElement( xmlWriter );
349     }
350     
351     void EnhancedShapeDumper::dumpExtrusionColorAsAttribute(bool bExtrusionColor)

** CID 1474398:    (CHECKED_RETURN)
/sw/source/core/txtnode/txatbase.cxx: 93 in SwTextAttr::dumpAsXml(_xmlTextWriter *) const()
/sw/source/core/txtnode/txatbase.cxx: 92 in SwTextAttr::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474398:    (CHECKED_RETURN)
/sw/source/core/txtnode/txatbase.cxx: 93 in SwTextAttr::dumpAsXml(_xmlTextWriter *) const()
87     }
88     
89     void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
90     {
91         xmlTextWriterStartElement(pWriter, BAD_CAST("SwTextAttr"));
92         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
>>>     CID 1474398:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(pWriter, (xmlChar *)"symbol", "%s", (xmlChar *)typeid (*this)->name())" without checking return value. This library function may fail and return an error code.
93         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s",
94                                           BAD_CAST(typeid(*this).name()));
95     
96         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("start"), BAD_CAST(OString::number(m_nStart).getStr()));
97         if (End())
98             xmlTextWriterWriteAttribute(pWriter, BAD_CAST("end"), BAD_CAST(OString::number(*End()).getStr()));
/sw/source/core/txtnode/txatbase.cxx: 92 in SwTextAttr::dumpAsXml(_xmlTextWriter *) const()
86             m_pHints->EndPosChanged();
87     }
88     
89     void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
90     {
91         xmlTextWriterStartElement(pWriter, BAD_CAST("SwTextAttr"));
>>>     CID 1474398:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(pWriter, (xmlChar *)"ptr", "%p", this)" without checking return value. This library function may fail and return an error code.
92         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
93         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s",
94                                           BAD_CAST(typeid(*this).name()));
95     
96         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("start"), BAD_CAST(OString::number(m_nStart).getStr()));
97         if (End())

** CID 1474397:    (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 334 in <unnamed>::dumpFillBitmapAsElement(const com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> &, _xmlTextWriter *)()
/drawinglayer/source/dumper/XShapeDumper.cxx: 335 in <unnamed>::dumpFillBitmapAsElement(const com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> &, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474397:    (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 334 in <unnamed>::dumpFillBitmapAsElement(const com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> &, _xmlTextWriter *)()
328     void dumpFillBitmapAsElement(const uno::Reference<awt::XBitmap>& xBitmap, xmlTextWriterPtr xmlWriter)
329     {
330         xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" ));
331         if (xBitmap.is())
332         {
333             awt::Size const aSize = xBitmap->getSize();
>>>     CID 1474397:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"width", "%d", aSize.Width)" without checking return value. This library function may fail and return an error code.
334             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSize.Width);
335             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSize.Height);
336         }
337         xmlTextWriterEndElement( xmlWriter );
338     }
339     
/drawinglayer/source/dumper/XShapeDumper.cxx: 335 in <unnamed>::dumpFillBitmapAsElement(const com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> &, _xmlTextWriter *)()
329     {
330         xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" ));
331         if (xBitmap.is())
332         {
333             awt::Size const aSize = xBitmap->getSize();
334             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSize.Width);
>>>     CID 1474397:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"height", "%d", aSize.Height)" without checking return value. This library function may fail and return an error code.
335             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSize.Height);
336         }
337         xmlTextWriterEndElement( xmlWriter );
338     }
339     
340     void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter)

** CID 1474396:    (CHECKED_RETURN)
/editeng/source/items/textitem.cxx: 433 in SvxPostureItem::dumpAsXml(_xmlTextWriter *) const()
/editeng/source/items/textitem.cxx: 432 in SvxPostureItem::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474396:    (CHECKED_RETURN)
/editeng/source/items/textitem.cxx: 433 in SvxPostureItem::dumpAsXml(_xmlTextWriter *) const()
427     }
428     
429     void SvxPostureItem::dumpAsXml(xmlTextWriterPtr pWriter) const
430     {
431         xmlTextWriterStartElement(pWriter, BAD_CAST("SvxPostureItem"));
432         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which());
>>>     CID 1474396:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(pWriter, (xmlChar *)"value", "%d", this->GetValue())" without checking return value. This library function may fail and return an error code.
433         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%d", GetValue());
434         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(GetValueTextByPos(GetValue()).toUtf8().getStr()));
435         xmlTextWriterEndElement(pWriter);
436     }
437     
438     // class SvxWeightItem ---------------------------------------------------
/editeng/source/items/textitem.cxx: 432 in SvxPostureItem::dumpAsXml(_xmlTextWriter *) const()
426         SetValue( bVal ? ITALIC_NORMAL : ITALIC_NONE );
427     }
428     
429     void SvxPostureItem::dumpAsXml(xmlTextWriterPtr pWriter) const
430     {
431         xmlTextWriterStartElement(pWriter, BAD_CAST("SvxPostureItem"));
>>>     CID 1474396:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(pWriter, (xmlChar *)"whichId", "%d", this->Which())" without checking return value. This library function may fail and return an error code.
432         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which());
433         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%d", GetValue());
434         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(GetValueTextByPos(GetValue()).toUtf8().getStr()));
435         xmlTextWriterEndElement(pWriter);
436     }
437     

** CID 1474395:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1474395:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/outdev/nativecontrols.cxx: 308 in OutputDevice::GetNativeControlRegion(ControlType, ControlPart, const tools::Rectangle &, ControlState, const ImplControlValue &, tools::Rectangle &, tools::Rectangle &) const()
302     
303         // Convert the coordinates from relative to Window-absolute, so we draw
304         // in the correct place in platform code
305         std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
306         tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
307     
>>>     CID 1474395:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "this->mpGraphics" to "GetNativeControlRegion", which dereferences it.
308         bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
309                                     rNativeBoundingRegion,
310                                     rNativeContentRegion, *this );
311         if( bRet )
312         {
313             // transform back native regions

** CID 1474394:    (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1474394:    (FORWARD_NULL)
/vcl/source/outdev/nativecontrols.cxx: 284 in OutputDevice::DrawNativeControl(ControlType, ControlPart, const tools::Rectangle &, ControlState, const ImplControlValue &, const rtl::OUString &, const Color &)()
278     
279         // Convert the coordinates from relative to Window-absolute, so we draw
280         // in the correct place in platform code
281         std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
282         tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
283     
>>>     CID 1474394:    (FORWARD_NULL)
>>>     Passing null pointer "this->mpGraphics" to "DrawNativeControl", which dereferences it.
284         bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, *this, rBackgroundColor);
285     
286         return bRet;
287     }
288     
289     bool OutputDevice::GetNativeControlRegion(  ControlType nType,
/vcl/source/outdev/nativecontrols.cxx: 277 in OutputDevice::DrawNativeControl(ControlType, ControlPart, const tools::Rectangle &, ControlState, const ImplControlValue &, const rtl::OUString &, const Color &)()
271         if ( mbOutputClipped )
272             return true;
273     
274         if ( mbInitLineColor )
275             InitLineColor();
276         if ( mbInitFillColor )
>>>     CID 1474394:    (FORWARD_NULL)
>>>     "InitFillColor" dereferences null "this->mpGraphics".
277             InitFillColor();
278     
279         // Convert the coordinates from relative to Window-absolute, so we draw
280         // in the correct place in platform code
281         std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
282         tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
/vcl/source/outdev/nativecontrols.cxx: 275 in OutputDevice::DrawNativeControl(ControlType, ControlPart, const tools::Rectangle &, ControlState, const ImplControlValue &, const rtl::OUString &, const Color &)()
269         if ( mbInitClipRegion )
270             InitClipRegion();
271         if ( mbOutputClipped )
272             return true;
273     
274         if ( mbInitLineColor )
>>>     CID 1474394:    (FORWARD_NULL)
>>>     "InitLineColor" dereferences null "this->mpGraphics".
275             InitLineColor();
276         if ( mbInitFillColor )
277             InitFillColor();
278     
279         // Convert the coordinates from relative to Window-absolute, so we draw
280         // in the correct place in platform code

** CID 1474393:  Error handling issues  (CHECKED_RETURN)
/editeng/source/editeng/editobj.cxx: 424 in EditTextObject::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474393:  Error handling issues  (CHECKED_RETURN)
/editeng/source/editeng/editobj.cxx: 424 in EditTextObject::dumpAsXml(_xmlTextWriter *) const()
418     {
419         bool bOwns = false;
420         if (!pWriter)
421         {
422             pWriter = xmlNewTextWriterFilename("editTextObject.xml", 0);
423             xmlTextWriterSetIndent(pWriter,1);
>>>     CID 1474393:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterSetIndentString(pWriter, (xmlChar *)"  ")" without checking return value. This library function may fail and return an error code.
424             xmlTextWriterSetIndentString(pWriter, BAD_CAST("  "));
425             xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
426             bOwns = true;
427         }
428     
429         xmlTextWriterStartElement(pWriter, BAD_CAST("EditTextObject"));

** CID 1474392:    (FORWARD_NULL)
/vcl/source/outdev/polygon.cxx: 184 in OutputDevice::DrawPolygon(const tools::Polygon &)()


________________________________________________________________________________________________________
*** CID 1474392:    (FORWARD_NULL)
/vcl/source/outdev/polygon.cxx: 181 in OutputDevice::DrawPolygon(const tools::Polygon &)()
175             return;
176     
177         if ( mbInitLineColor )
178             InitLineColor();
179     
180         if ( mbInitFillColor )
>>>     CID 1474392:    (FORWARD_NULL)
>>>     "InitFillColor" dereferences null "this->mpGraphics".
181             InitFillColor();
182     
183         // use b2dpolygon drawing if possible
184         if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
185            RasterOp::OverPaint == GetRasterOp() &&
186            (IsLineColor() || IsFillColor()))
/vcl/source/outdev/polygon.cxx: 178 in OutputDevice::DrawPolygon(const tools::Polygon &)()
172             InitClipRegion();
173     
174         if ( mbOutputClipped )
175             return;
176     
177         if ( mbInitLineColor )
>>>     CID 1474392:    (FORWARD_NULL)
>>>     "InitLineColor" dereferences null "this->mpGraphics".
178             InitLineColor();
179     
180         if ( mbInitFillColor )
181             InitFillColor();
182     
183         // use b2dpolygon drawing if possible
/vcl/source/outdev/polygon.cxx: 184 in OutputDevice::DrawPolygon(const tools::Polygon &)()
178             InitLineColor();
179     
180         if ( mbInitFillColor )
181             InitFillColor();
182     
183         // use b2dpolygon drawing if possible
>>>     CID 1474392:    (FORWARD_NULL)
>>>     Passing null pointer "this->mpGraphics" to "supportsOperation", which dereferences it. (The dereference happens because this is a virtual function call.)
184         if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
185            RasterOp::OverPaint == GetRasterOp() &&
186            (IsLineColor() || IsFillColor()))
187         {
188             const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation());
189             basegfx::B2DPolygon aB2DPolygon(rPoly.getB2DPolygon());

** CID 1474391:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 551 in <unnamed>::dumpLineEndNameAsAttribute(std::basic_string_view<char16_t, std::char_traits<char16_t>>, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474391:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 551 in <unnamed>::dumpLineEndNameAsAttribute(std::basic_string_view<char16_t, std::char_traits<char16_t>>, _xmlTextWriter *)()
545         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartName"), "%s",
546         OUStringToOString(sLineStartName, RTL_TEXTENCODING_UTF8).getStr());
547     }
548     
549     void dumpLineEndNameAsAttribute(std::u16string_view sLineEndName, xmlTextWriterPtr xmlWriter)
550     {
>>>     CID 1474391:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"lineEndName", "%s", rtl::OString(rtl::OUStringToOString(sLineEndName, 76, 1382U)).getStr())" without checking return value. This library function may fail and return an error code.
551         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndName"), "%s",
552         OUStringToOString(sLineEndName, RTL_TEXTENCODING_UTF8).getStr());
553     }
554     
555     void dumpPolyPolygonBezierCoords(const drawing::PolyPolygonBezierCoords& rPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter)
556     {

** CID 1474390:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 226 in <unnamed>::dumpFillColorAsAttribute(int, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474390:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 226 in <unnamed>::dumpFillColorAsAttribute(int, _xmlTextWriter *)()
220                 break;
221         }
222     }
223     
224     void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter)
225     {
>>>     CID 1474390:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"fillColor", "%06x", static_cast<unsigned int>(aColor))" without checking return value. This library function may fail and return an error code.
226         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillColor"), "%06x", static_cast<unsigned int>(aColor));
227     }
228     
229     void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter)
230     {
231         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparence"), "%" SAL_PRIdINT32, aTransparence);

** CID 1474389:    (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1474389:    (FORWARD_NULL)
/vcl/source/window/window2.cxx: 211 in vcl::Window::InvertTracking(const tools::Rectangle &, ShowTrackFlags)()
205             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, *this );
206         else
207         {
208             tools::Long nBorder = 1;
209             if ( nStyle == ShowTrackFlags::Big )
210                 nBorder = 5;
>>>     CID 1474389:    (FORWARD_NULL)
>>>     Passing null pointer "pGraphics" to "Invert", which dereferences it.
211             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SalInvert::N50, *this );
212             pGraphics->Invert( aRect.Left(), aRect.Bottom()-nBorder+1, aRect.GetWidth(), nBorder, SalInvert::N50, *this );
213             pGraphics->Invert( aRect.Left(), aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SalInvert::N50, *this );
214             pGraphics->Invert( aRect.Right()-nBorder+1, aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SalInvert::N50, *this );
215         }
216     }
/vcl/source/window/window2.cxx: 203 in vcl::Window::InvertTracking(const tools::Rectangle &, ShowTrackFlags)()
197                 pOutDev->SelectClipRegion( aRegion, pGraphics );
198             }
199         }
200     
201         ShowTrackFlags nStyle = nFlags & ShowTrackFlags::StyleMask;
202         if ( nStyle == ShowTrackFlags::Object )
>>>     CID 1474389:    (FORWARD_NULL)
>>>     Passing null pointer "pGraphics" to "Invert", which dereferences it.
203             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::TrackFrame, *this );
204         else if ( nStyle == ShowTrackFlags::Split )
205             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, *this );
206         else
207         {
208             tools::Long nBorder = 1;
/vcl/source/window/window2.cxx: 205 in vcl::Window::InvertTracking(const tools::Rectangle &, ShowTrackFlags)()
199         }
200     
201         ShowTrackFlags nStyle = nFlags & ShowTrackFlags::StyleMask;
202         if ( nStyle == ShowTrackFlags::Object )
203             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::TrackFrame, *this );
204         else if ( nStyle == ShowTrackFlags::Split )
>>>     CID 1474389:    (FORWARD_NULL)
>>>     Passing null pointer "pGraphics" to "Invert", which dereferences it.
205             pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SalInvert::N50, *this );
206         else
207         {
208             tools::Long nBorder = 1;
209             if ( nStyle == ShowTrackFlags::Big )
210                 nBorder = 5;

** CID 1474388:    (CHECKED_RETURN)
/sw/source/core/txtnode/atrftn.cxx: 596 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()
/sw/source/core/txtnode/atrftn.cxx: 601 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()
/sw/source/core/txtnode/atrftn.cxx: 589 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474388:    (CHECKED_RETURN)
/sw/source/core/txtnode/atrftn.cxx: 596 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()
590                                         BAD_CAST(OString::number(m_pStartNode->GetIndex()).getStr()));
591             xmlTextWriterEndElement(pWriter);
592         }
593         if (m_pTextNode)
594         {
595             xmlTextWriterStartElement(pWriter, BAD_CAST("m_pTextNode"));
>>>     CID 1474388:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteAttribute(pWriter, (xmlChar *)"index", (xmlChar *)rtl::OString::number(this->m_pTextNode->GetIndex(), 10).getStr())" without checking return value. This library function may fail and return an error code.
596             xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
597                                         BAD_CAST(OString::number(m_pTextNode->GetIndex()).getStr()));
598             xmlTextWriterEndElement(pWriter);
599         }
600         xmlTextWriterStartElement(pWriter, BAD_CAST("m_nSeqNo"));
601         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
/sw/source/core/txtnode/atrftn.cxx: 601 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()
595             xmlTextWriterStartElement(pWriter, BAD_CAST("m_pTextNode"));
596             xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
597                                         BAD_CAST(OString::number(m_pTextNode->GetIndex()).getStr()));
598             xmlTextWriterEndElement(pWriter);
599         }
600         xmlTextWriterStartElement(pWriter, BAD_CAST("m_nSeqNo"));
>>>     CID 1474388:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteAttribute(pWriter, (xmlChar *)"value", (xmlChar *)rtl::OString::number(this->m_nSeqNo, 10).getStr())" without checking return value. This library function may fail and return an error code.
601         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
602                                     BAD_CAST(OString::number(m_nSeqNo).getStr()));
603         xmlTextWriterEndElement(pWriter);
604     
605         xmlTextWriterEndElement(pWriter);
606     }
607     
/sw/source/core/txtnode/atrftn.cxx: 589 in SwTextFootnote::dumpAsXml(_xmlTextWriter *) const()
583         xmlTextWriterStartElement(pWriter, BAD_CAST("SwTextFootnote"));
584         SwTextAttr::dumpAsXml(pWriter);
585     
586         if (m_pStartNode)
587         {
588             xmlTextWriterStartElement(pWriter, BAD_CAST("m_pStartNode"));
>>>     CID 1474388:    (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteAttribute(pWriter, (xmlChar *)"index", (xmlChar *)rtl::OString::number(this->m_pStartNode->GetIndex(), 10).getStr())" without checking return value. This library function may fail and return an error code.
589             xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
590                                         BAD_CAST(OString::number(m_pStartNode->GetIndex()).getStr()));
591             xmlTextWriterEndElement(pWriter);
592         }
593         if (m_pTextNode)
594         {

** CID 1474387:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 472 in <unnamed>::dumpLineDashAsElement(const com::sun::star::drawing::LineDash &, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474387:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 472 in <unnamed>::dumpLineDashAsElement(const com::sun::star::drawing::LineDash &, _xmlTextWriter *)()
466                 break;
467         }
468     }
469     
470     void dumpLineDashAsElement(const drawing::LineDash& rLineDash, xmlTextWriterPtr xmlWriter)
471     {
>>>     CID 1474387:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterStartElement(xmlWriter, (xmlChar *)"LineDash")" without checking return value. This library function may fail and return an error code.
472         xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineDash" ));
473         switch (rLineDash.Style)
474         {
475             case drawing::DashStyle_RECT:
476                 xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECT");
477                 break;

** CID 1474386:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/outdev/outdev.cxx: 261 in OutputDevice::GetNativeSurfaceHandle(std::shared_ptr<cairo::Surface> &, const basegfx::B2IVector &) const()


________________________________________________________________________________________________________
*** CID 1474386:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/outdev/outdev.cxx: 261 in OutputDevice::GetNativeSurfaceHandle(std::shared_ptr<cairo::Surface> &, const basegfx::B2IVector &) const()
255     }
256     
257     css::uno::Any OutputDevice::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const
258     {
259         if (!mpGraphics && !AcquireGraphics())
260             return css::uno::Any();
>>>     CID 1474386:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "this->mpGraphics" to "GetNativeSurfaceHandle", which dereferences it. (The dereference happens because this is a virtual function call.)
261         return mpGraphics->GetNativeSurfaceHandle(rSurface, rSize);
262     }
263     
264     #endif // ENABLE_CAIRO_CANVAS
265     
266     css::uno::Any OutputDevice::GetSystemGfxDataAny() const

** CID 1474385:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/doc/docfmt.cxx: 1943 in SwDoc::dumpAsXml(_xmlTextWriter *) const()


________________________________________________________________________________________________________
*** CID 1474385:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/doc/docfmt.cxx: 1943 in SwDoc::dumpAsXml(_xmlTextWriter *) const()
1937             xmlTextWriterSetIndent(pWriter,1);
1938             xmlTextWriterSetIndentString(pWriter, BAD_CAST("  "));
1939             xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
1940             bOwns = true;
1941         }
1942         xmlTextWriterStartElement(pWriter, BAD_CAST("SwDoc"));
>>>     CID 1474385:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(pWriter, (xmlChar *)"ptr", "%p", this)" without checking return value. This library function may fail and return an error code.
1943         xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
1944     
1945         m_pNodes->dumpAsXml(pWriter);
1946         m_PageDescs.dumpAsXml(pWriter);
1947         maDBData.dumpAsXml(pWriter);
1948         mpMarkManager->dumpAsXml(pWriter);

** CID 1474384:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 821 in <unnamed>::dumpTextRightDistanceAsAttribute(int, _xmlTextWriter *)()


________________________________________________________________________________________________________
*** CID 1474384:  Error handling issues  (CHECKED_RETURN)
/drawinglayer/source/dumper/XShapeDumper.cxx: 821 in <unnamed>::dumpTextRightDistanceAsAttribute(int, _xmlTextWriter *)()
815     {
816         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLeftDistance"), "%" SAL_PRIdINT32, aTextLeftDistance);
817     }
818     
819     void dumpTextRightDistanceAsAttribute(sal_Int32 aTextRightDistance, xmlTextWriterPtr xmlWriter)
820     {
>>>     CID 1474384:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "xmlTextWriterWriteFormatAttribute(xmlWriter, (xmlChar *)"textRightDistance", "%d", aTextRightDistance)" without checking return value. This library function may fail and return an error code.
821         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textRightDistance"), "%" SAL_PRIdINT32, aTextRightDistance);
822     }
823     
824     void dumpTextUpperDistanceAsAttribute(sal_Int32 aTextUpperDistance, xmlTextWriterPtr xmlWriter)
825     {
826         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textUpperDistance"), "%" SAL_PRIdINT32, aTextUpperDistance);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DSROF_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi7RCotroci68TTIslLRQdzRZeOje3hmIV7eO4ol-2Fc1j1ZdUOIu-2FM4BkYzU3oH2fVFLcWgC-2FP6n0NPJeChAUxggEfSfK5Jk5z9Vs44xMh0kAPwIDEuAMs9kXxxtWIIn6S9pBAmhb3A9bdZFJX1wDUNmJEx-2B-2BA8lL0MYWsMT6sr2I7P7GCm0CPc2jHV7rxaFT-2Fd

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux