New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Wed Mar 24 02:28:20 UTC 2021


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.
19 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 1474444:    (DIVIDE_BY_ZERO)


________________________________________________________________________________________________________
*** CID 1474444:    (DIVIDE_BY_ZERO)
/vcl/source/fontsubset/sft.cxx: 2067 in vcl::GetTTGlobalFontInfo(vcl::TrueTypeFont *, vcl::TTGlobalFontInfo_ *)()
2061     
2062         GetTTGlobalFontHeadInfo(ttf, info->xMin, info->yMin, info->xMax, info->yMax, info->macStyle);
2063     
2064         table  = ttf->table(O_hhea, table_size);
2065         if (table_size >= 10)
2066         {
>>>     CID 1474444:    (DIVIDE_BY_ZERO)
>>>     In function call "XUnits", division by expression "UPEm" which may be zero has undefined behavior.
2067             info->ascender  = XUnits(UPEm, GetInt16(table, HHEA_ascender_offset));
2068             info->descender = XUnits(UPEm, GetInt16(table, HHEA_descender_offset));
2069             info->linegap   = XUnits(UPEm, GetInt16(table, HHEA_lineGap_offset));
2070         }
2071     }
2072     
/vcl/source/fontsubset/sft.cxx: 2068 in vcl::GetTTGlobalFontInfo(vcl::TrueTypeFont *, vcl::TTGlobalFontInfo_ *)()
2062         GetTTGlobalFontHeadInfo(ttf, info->xMin, info->yMin, info->xMax, info->yMax, info->macStyle);
2063     
2064         table  = ttf->table(O_hhea, table_size);
2065         if (table_size >= 10)
2066         {
2067             info->ascender  = XUnits(UPEm, GetInt16(table, HHEA_ascender_offset));
>>>     CID 1474444:    (DIVIDE_BY_ZERO)
>>>     In function call "XUnits", division by expression "UPEm" which may be zero has undefined behavior.
2068             info->descender = XUnits(UPEm, GetInt16(table, HHEA_descender_offset));
2069             info->linegap   = XUnits(UPEm, GetInt16(table, HHEA_lineGap_offset));
2070         }
2071     }
2072     
2073     GlyphData *GetTTRawGlyphData(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID)
/vcl/source/fontsubset/sft.cxx: 2069 in vcl::GetTTGlobalFontInfo(vcl::TrueTypeFont *, vcl::TTGlobalFontInfo_ *)()
2063     
2064         table  = ttf->table(O_hhea, table_size);
2065         if (table_size >= 10)
2066         {
2067             info->ascender  = XUnits(UPEm, GetInt16(table, HHEA_ascender_offset));
2068             info->descender = XUnits(UPEm, GetInt16(table, HHEA_descender_offset));
>>>     CID 1474444:    (DIVIDE_BY_ZERO)
>>>     In function call "XUnits", division by expression "UPEm" which may be zero has undefined behavior.
2069             info->linegap   = XUnits(UPEm, GetInt16(table, HHEA_lineGap_offset));
2070         }
2071     }
2072     
2073     GlyphData *GetTTRawGlyphData(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID)
2074     {

** CID 1474443:    (UNINIT)
/vcl/unx/generic/app/saldisp.cxx: 2369 in SalVisual::SalVisual(const XVisualInfo *)()
/vcl/unx/generic/app/saldisp.cxx: 2368 in SalVisual::SalVisual(const XVisualInfo *)()


________________________________________________________________________________________________________
*** CID 1474443:    (UNINIT)
/vcl/unx/generic/app/saldisp.cxx: 2369 in SalVisual::SalVisual(const XVisualInfo *)()
2363     {
2364         *static_cast<XVisualInfo*>(this) = *pXVI;
2365         if( GetClass() != TrueColor )
2366         {
2367             eRGBMode_ = SalRGB::RGB;
2368             nRedShift_ = nGreenShift_ = nBlueShift_;
>>>     CID 1474443:    (UNINIT)
>>>     Using uninitialized value "this->nBlueBits_".
2369             nRedBits_ = nGreenBits_ = nBlueBits_;
2370             return;
2371         }
2372     
2373         nRedShift_      = sal_Shift( red_mask );
2374         nGreenShift_    = sal_Shift( green_mask );
/vcl/unx/generic/app/saldisp.cxx: 2368 in SalVisual::SalVisual(const XVisualInfo *)()
2362     SalVisual::SalVisual( const XVisualInfo* pXVI )
2363     {
2364         *static_cast<XVisualInfo*>(this) = *pXVI;
2365         if( GetClass() != TrueColor )
2366         {
2367             eRGBMode_ = SalRGB::RGB;
>>>     CID 1474443:    (UNINIT)
>>>     Using uninitialized value "this->nBlueShift_".
2368             nRedShift_ = nGreenShift_ = nBlueShift_;
2369             nRedBits_ = nGreenBits_ = nBlueBits_;
2370             return;
2371         }
2372     
2373         nRedShift_      = sal_Shift( red_mask );


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DxVQY_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi2dqq3YbcSbmKlddTGlADjLNzAx4jNxeUK65RjI2-2BsSBcNJ5mBvT88xslW3pGfdLtnJYooBhObuHW-2FV7o-2B89AHA98XEwyQ62wtr6AHrXgE5Bq-2F0GN7zjAsg-2FQyrnItgFS5yZBk-2FiNzYRBiy7vGcbQjW7mwZOwzhluuV2vE9q1rHddQeGwP3Yh30h8uCuAJ1hE



More information about the LibreOffice mailing list