New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Fri Aug 30 06:13:08 UTC 2024
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
5 new defect(s) introduced to LibreOffice found with Coverity Scan.
16 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 5 of 5 defect(s)
** CID 1618707: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1618707: Null pointer dereferences (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 858 in drawinglayer::primitive2d::createNewSdrLineEffectsTextAttribute(const SfxItemSet &, const SdrText *)()
852
853 if(!aLine.isDefault() || !aText.isDefault())
854 {
855 // try shadow
856 attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
857 attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
>>> CID 1618707: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pText" to "GetObject", which dereferences it.
858 attribute::SdrGlowTextAttribute aGlowText = createNewSdrGlowTextAttribute(rSet, pText->GetObject());
859 const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
860
861 return attribute::SdrLineEffectsTextAttribute(std::move(aLine),
862 std::move(aLineStartEnd),
863 std::move(aShadow),
** CID 1618706: Integer handling issues (INTEGER_OVERFLOW)
/sw/source/writerfilter/ooxml/OOXMLPropertySet.cxx: 281 in writerfilter::ooxml::OOXMLValue::createHexColor(std::basic_string_view<char, std::char_traits<char>>)()
________________________________________________________________________________________________________
*** CID 1618706: Integer handling issues (INTEGER_OVERFLOW)
/sw/source/writerfilter/ooxml/OOXMLPropertySet.cxx: 281 in writerfilter::ooxml::OOXMLValue::createHexColor(std::basic_string_view<char, std::char_traits<char>>)()
275 // Word appears to require strict 6 digit length, else it ignores it
276 if ( nLen == 7 )
277 {
278 const OUString sHashColor(pValue.data(), nLen, RTL_TEXTENCODING_ASCII_US);
279 sax::Converter::convertColor( nColor, sHashColor );
280 }
>>> CID 1618706: Integer handling issues (INTEGER_OVERFLOW)
>>> Expression "aValue", which is equal to -1, where "nColor" is known to be equal to -1, overflows the type that receives it, an unsigned integer 32 bits wide.
281 aValue = nColor;
282 }
283 return OOXMLValue(VariantType(std::in_place_index_t<5>(), aValue));
284 }
285
286 // static
** CID 1618705: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1618705: Null pointer dereferences (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 933 in drawinglayer::primitive2d::createNewSdrLineFillEffectsTextAttribute(const SfxItemSet &, const SdrText *, bool, bool)()
927 createNewSdrShadowAttribute(rSet) : attribute::SdrShadowAttribute();
928
929 // glow
930 const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
931
932 // text glow
>>> CID 1618705: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pText" to "GetObject", which dereferences it.
933 const attribute::SdrGlowTextAttribute aGlowText = createNewSdrGlowTextAttribute(rSet, pText->GetObject());
934
935 const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
936
937 return attribute::SdrLineFillEffectsTextAttribute(aLine, std::move(aFill), aLineStartEnd,
938 aShadow, std::move(aFillFloatTransGradient),
** CID 1618704: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1618704: Null pointer dereferences (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 810 in drawinglayer::primitive2d::createNewSdrEffectsTextAttribute(const SfxItemSet &, const SdrText *, bool)()
804 aText = createNewSdrTextAttribute(rSet, *pText);
805 }
806
807 // try shadow
808 const attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
809 const attribute::SdrGlowAttribute aGlow(createNewSdrGlowAttribute(rSet));
>>> CID 1618704: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pText" to "GetObject", which dereferences it.
810 const attribute::SdrGlowTextAttribute aGlowText(createNewSdrGlowTextAttribute(rSet, pText->GetObject()));
811 const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
812
813 return attribute::SdrEffectsTextAttribute(aShadow, std::move(aText),
814 aGlow, aGlowText, nSoftEdgeRadius);
815 }
** CID 1618703: Null pointer dereferences (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1618703: Null pointer dereferences (NULL_RETURNS)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 226 in drawinglayer::<unnamed>::createNewSdrGlowTextAttribute(const SfxItemSet &, const SdrTextObj &)()
220 if (nTextTransparency)
221 aTextColor.SetAlpha(255 - std::round(nTextTransparency / 100.0 * 255.0));
222
223 // calculate rendering text glow radius from biggest Char size for the full text in shape
224 double nRadius = 0.0;
225 const SvxFontHeightItem& rItem = *rSet.GetItemIfSet(EE_CHAR_FONTHEIGHT);
>>> CID 1618703: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "rItem" when calling "GetHeight".
226 sal_uInt32 nFontSize = rItem.GetHeight();
227
228 if (rTextObj.GetOutlinerParaObject())
229 {
230 const EditTextObject& aEdit = rTextObj.GetOutlinerParaObject()->GetTextObject();
231 for (sal_Int32 i = 0; i < aEdit.GetParagraphCount(); i++)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DLkil_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtISZRWnatEKTPxyUYaP6yb78AnSVs2ZxGSyEMLM0m2HQK-2FCgLpHdDaJYdO7fzc5FafDxVnOXza3mTKK5yx9J2UHFBermOj1t4kmUYQZdk0iOg9A-2BbFqmXzeef9IqWV7xQRfDbyd2BRN-2Fzds3g6pZET0A3Jr2oy5iknELowgDpxeI-3D
More information about the LibreOffice
mailing list