New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Mon Apr 3 09:17:21 UTC 2023


Hi,

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

2 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 2 of 2 defect(s)


** CID 1524677:    (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1524677:    (FORWARD_NULL)
/oox/source/drawingml/fillproperties.cxx: 773 in oox::drawingml::FillProperties::pushToPropMap(oox::drawingml::ShapePropertyMap &, const oox::GraphicHelper &, int, Color, const com::sun::star::awt::Size &, short, bool, bool, bool) const()
767                             nBorder = aPrev->first - aNext->first;
768                             aGradientStops.erase(aNext);
769                             aWidestSegmentStart = aGradientStops.begin();
770                             bSwap = true;
771                             nShapeRotation = 180*60000 - nShapeRotation;
772                         }
>>>     CID 1524677:    (FORWARD_NULL)
>>>     Passing null pointer "aWidestSegmentStart->second" to "getColor", which dereferences it.
773                         else if( !bSymmetric &&
774                                  aGradientStops.size() >= 4 &&
775                                  aWidestSegmentStart->second.getColor( rGraphicHelper, nPhClr ) == std::next(aWidestSegmentStart)->second.getColor(rGraphicHelper, nPhClr) &&
776                                  aWidestSegmentStart->second.getTransparency() == std::next(aWidestSegmentStart)->second.getTransparency() &&
777                                  ( aWidestSegmentStart == aGradientStops.begin() ||
778                                    std::next(aWidestSegmentStart) == std::prev(aGradientStops.end())))
/oox/source/drawingml/fillproperties.cxx: 832 in oox::drawingml::FillProperties::pushToPropMap(oox::drawingml::ShapePropertyMap &, const oox::GraphicHelper &, int, Color, const com::sun::star::awt::Size &, short, bool, bool, bool) const()
826     
827                         // Try to grow the widest segment backwards: if a previous segment has the same
828                         // color, just different transparency, include it.
829                         while (aWidestSegmentStart != aGradientStops.begin())
830                         {
831                             auto it = std::prev(aWidestSegmentStart);
>>>     CID 1524677:    (FORWARD_NULL)
>>>     Passing null pointer "aWidestSegmentStart->second" to "getColor", which dereferences it.
832                             if (it->second.getColor(rGraphicHelper, nPhClr)
833                                 != aWidestSegmentStart->second.getColor(rGraphicHelper, nPhClr))
834                             {
835                                 break;
836                             }
837     

** CID 1524676:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1524676:  Null pointer dereferences  (FORWARD_NULL)
/oox/source/drawingml/fillproperties.cxx: 572 in oox::drawingml::FillProperties::pushToPropMap(oox::drawingml::ShapePropertyMap &, const oox::GraphicHelper &, int, Color, const com::sun::star::awt::Size &, short, bool, bool, bool) const()
566                         const sal_Int32 nDmlAngle = nShadeAngle + nShapeRotation;
567                         // convert DrawingML angle (in 1/60000 degrees) to API angle (in 1/10 degrees)
568                         aGradient.Angle = static_cast< sal_Int16 >( (8100 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 );
569                     }
570     
571                     // set ColorStops using UNO API
>>>     CID 1524676:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing "aGradient.ColorStops" to "fillColorStopSequenceFromColorStops", which dereferences null "aGradient.ColorStops._pSequence".
572                     basegfx::utils::fillColorStopSequenceFromColorStops(aGradient.ColorStops, aColorStops);
573     
574                     // push gradient or named gradient to property map
575                     if (rPropMap.setProperty(ShapeProperty::FillGradient, aGradient))
576                     {
577                         eFillStyle = FillStyle_GRADIENT;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DtSNR_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi6GK1uQGrkSo0Dkmhd-2B9WVcnb-2BOpYkUhXLO2z6LN1XLapJEvrBdzAwZnheOyRsGWsDjplsEdR3AmLM9XmjWudpXdQj5-2F5wm-2FMnlpsuu805svwSKIunl2JgDjzj3cNfCL7-2BzuVr23-2BgRMtGpn3DhPtAVTF7Nmox-2B-2BMX082PUR5gz8-3D



More information about the LibreOffice mailing list