New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun Apr 7 12:56:49 UTC 2024


Hi,

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

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


** CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2815 in SwTransferable::PasteGrf(const TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, SwPasteSdr, const Point *, SotExchangeActionFlags, signed char, bool, RndStdIds)()


________________________________________________________________________________________________________
*** CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2815 in SwTransferable::PasteGrf(const TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, SwPasteSdr, const Point *, SotExchangeActionFlags, signed char, bool, RndStdIds)()
2809         case SotClipboardFormatId::SVXB:
2810         {
2811             std::unique_ptr<SvStream> xStm;
2812     
2813             if(rData.GetSotStorageStream(SotClipboardFormatId::SVXB, xStm))
2814             {
>>>     CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2815                 TypeSerializer aSerializer(*xStm);
2816                 aSerializer.readGraphic(aGraphic);
2817                 bRet = (GraphicType::NONE != aGraphic.GetType() && GraphicType::Default != aGraphic.GetType());
2818             }
2819     
2820             break;

** CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfun3.cxx: 785 in ScViewFunc::PasteOnDrawObjectLinked(const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, SdrObject &)()


________________________________________________________________________________________________________
*** CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfun3.cxx: 785 in ScViewFunc::PasteOnDrawObjectLinked(const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, SdrObject &)()
779             std::unique_ptr<SvStream> xStm;
780             ScDrawView* pScDrawView = GetScDrawView();
781     
782             if( pScDrawView && aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) )
783             {
784                 Graphic aGraphic;
>>>     CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
785                 TypeSerializer aSerializer(*xStm);
786                 aSerializer.readGraphic(aGraphic);
787     
788                 const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
789     
790                 if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "" ))

** CID 1596252:    (FORWARD_NULL)
/sc/source/ui/view/viewfun5.cxx: 256 in ScViewFunc::PasteDataFormat(SotClipboardFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, short, int, const Point *, bool, bool)()
/sc/source/ui/view/viewfun5.cxx: 238 in ScViewFunc::PasteDataFormat(SotClipboardFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, short, int, const Point *, bool, bool)()


________________________________________________________________________________________________________
*** CID 1596252:    (FORWARD_NULL)
/sc/source/ui/view/viewfun5.cxx: 256 in ScViewFunc::PasteDataFormat(SotClipboardFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, short, int, const Point *, bool, bool)()
250                 ScDocShellRef aDragShellRef( new ScDocShell );
251                 aDragShellRef->MakeDrawLayer();
252                 aDragShellRef->DoInitNew();
253     
254                 ScDrawLayer* pModel = aDragShellRef->GetDocument().GetDrawLayer();
255     
>>>     CID 1596252:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
256                 xStm->Seek(0);
257     
258                 css::uno::Reference< css::io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) );
259                 SvxDrawingLayerImport( pModel, xInputStream );
260     
261                 // set everything to right layer:
/sc/source/ui/view/viewfun5.cxx: 238 in ScViewFunc::PasteDataFormat(SotClipboardFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, short, int, const Point *, bool, bool)()
232         else if (nFormatId == SotClipboardFormatId::SVXB)
233         {
234             std::unique_ptr<SvStream> xStm;
235             if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) )
236             {
237                 Graphic aGraphic;
>>>     CID 1596252:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
238                 TypeSerializer aSerializer(*xStm);
239                 aSerializer.readGraphic(aGraphic);
240                 bRet = PasteGraphic( aPos, aGraphic, OUString() );
241             }
242         }
243         else if ( nFormatId == SotClipboardFormatId::DRAWING )

** CID 1596251:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java: 346 in com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.saveTextArea()()


________________________________________________________________________________________________________
*** CID 1596251:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java: 346 in com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.saveTextArea()()
340     
341             try {
342                 String s = view.getText();
343                 fos = scriptURL.openConnection().getOutputStream();
344     
345                 if (fos  != null) {
>>>     CID 1596251:  Null pointer dereferences  (NULL_RETURNS)
>>>     Calling a method on null object "s".
346                     fos.write(s.getBytes());
347                 } else {
348                     showErrorMessage(
349                         "Error saving script: Could not open stream for file");
350                     result = false;
351                 }

** CID 1596250:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1714 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()
/vcl/source/treelist/transfer.cxx: 1688 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()
/vcl/source/treelist/transfer.cxx: 1700 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()


________________________________________________________________________________________________________
*** CID 1596250:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1714 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()
1708             HasFormat( SotClipboardFormatId::WMF ) &&
1709             SotExchange::GetFormatDataFlavor( SotClipboardFormatId::WMF, aSubstFlavor ) &&
1710             GetSotStorageStream( aSubstFlavor, xStm ) )
1711         {
1712             Graphic aGraphic;
1713     
>>>     CID 1596250:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1714             if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
1715             {
1716                 rMtf = aGraphic.GetGDIMetaFile();
1717                 bRet = true;
1718             }
1719         }
/vcl/source/treelist/transfer.cxx: 1688 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()
1682         std::unique_ptr<SvStream> xStm;
1683         DataFlavor          aSubstFlavor;
1684         bool                bRet = false;
1685     
1686         if( GetSotStorageStream( rFlavor, xStm ) )
1687         {
>>>     CID 1596250:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1688             SvmReader aReader( *xStm );
1689             aReader.Read( rMtf );
1690             bRet = ( xStm->GetError() == ERRCODE_NONE );
1691         }
1692     
1693         if( !bRet &&
/vcl/source/treelist/transfer.cxx: 1700 in TransferableDataHelper::GetGDIMetaFile(const com::sun::star::datatransfer::DataFlavor &, GDIMetaFile &) const()
1694             HasFormat( SotClipboardFormatId::EMF ) &&
1695             SotExchange::GetFormatDataFlavor( SotClipboardFormatId::EMF, aSubstFlavor ) &&
1696             GetSotStorageStream( aSubstFlavor, xStm ) )
1697         {
1698             Graphic aGraphic;
1699     
>>>     CID 1596250:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1700             if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
1701             {
1702                 rMtf = aGraphic.GetGDIMetaFile();
1703                 bRet = true;
1704             }
1705         }

** CID 1596249:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java: 112 in com.sun.star.script.framework.provider.beanshell.ScriptSourceModel.execute(com.sun.star.script.provider.XScriptContext, java.lang.ClassLoader)()


________________________________________________________________________________________________________
*** CID 1596249:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java: 112 in com.sun.star.script.framework.provider.beanshell.ScriptSourceModel.execute(com.sun.star.script.provider.XScriptContext, java.lang.ClassLoader)()
106             interpreter.set("XSCRIPTCONTEXT", context);
107             interpreter.set("ARGUMENTS", new Object[0]);
108     
109             Object result;
110     
111             if (view.isModified()) {
>>>     CID 1596249:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "null" "view.getText()" when calling "eval".
112                 result = interpreter.eval(view.getText());
113             } else {
114                 result = interpreter.eval(getText());
115             }
116     
117             return result;

** CID 1596248:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()


________________________________________________________________________________________________________
*** CID 1596248:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()
2049                 if( GetSotStorageStream( aFlavor, xStm ) )
2050                 {
2051                     if( aFlavor.MimeType.indexOf( "text/uri-list" ) > -1 )
2052                     {
2053                         OStringBuffer aDiskString;
2054     
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2055                         while( xStm->ReadLine( aDiskString ) )
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }
2061                     else
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2062                         bRet = ( ReadFileList( *xStm, rFileList ).GetError() == ERRCODE_NONE );
2063                 }
2064             }
2065         }
2066     
2067         return bRet;
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }
2061                     else
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2062                         bRet = ( ReadFileList( *xStm, rFileList ).GetError() == ERRCODE_NONE );
2063                 }
2064             }
2065         }
2066     
2067         return bRet;
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()
2049                 if( GetSotStorageStream( aFlavor, xStm ) )
2050                 {
2051                     if( aFlavor.MimeType.indexOf( "text/uri-list" ) > -1 )
2052                     {
2053                         OStringBuffer aDiskString;
2054     
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2055                         while( xStm->ReadLine( aDiskString ) )
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }
/vcl/source/treelist/transfer.cxx: 2062 in TransferableDataHelper::GetFileList(FileList &) const()
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }
2061                     else
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2062                         bRet = ( ReadFileList( *xStm, rFileList ).GetError() == ERRCODE_NONE );
2063                 }
2064             }
2065         }
2066     
2067         return bRet;
/vcl/source/treelist/transfer.cxx: 2055 in TransferableDataHelper::GetFileList(FileList &) const()
2049                 if( GetSotStorageStream( aFlavor, xStm ) )
2050                 {
2051                     if( aFlavor.MimeType.indexOf( "text/uri-list" ) > -1 )
2052                     {
2053                         OStringBuffer aDiskString;
2054     
>>>     CID 1596248:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2055                         while( xStm->ReadLine( aDiskString ) )
2056                             if( !aDiskString.isEmpty() && aDiskString[0] != '#' )
2057                                 rFileList.AppendFile( OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
2058     
2059                         bRet = true;
2060                     }

** CID 1596247:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2185 in SwTransferable::PasteFileContent(const TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, bool, bool)()


________________________________________________________________________________________________________
*** CID 1596247:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2185 in SwTransferable::PasteFileContent(const TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, bool, bool)()
2179         default:
2180             if( rData.GetSotStorageStream( nFormat, xStrm ) )
2181             {
2182                 if( ( SotClipboardFormatId::HTML_SIMPLE == nFormat ) ||
2183                     ( SotClipboardFormatId::HTML_NO_COMMENT == nFormat ) )
2184                 {
>>>     CID 1596247:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStrm".
2185                     pStream = aMSE40ClpObj.IsValid( *xStrm );
2186                     pRead = ReadHTML;
2187                     pRead->SetReadUTF8( true );
2188     
2189                     bool bNoComments =
2190                         ( nFormat == SotClipboardFormatId::HTML_NO_COMMENT );

** CID 1596246:    (FORWARD_NULL)
/chart2/source/controller/main/ChartController_Tools.cxx: 272 in chart::ChartController::executeDispatch_Paste()()
/chart2/source/controller/main/ChartController_Tools.cxx: 290 in chart::ChartController::executeDispatch_Paste()()


________________________________________________________________________________________________________
*** CID 1596246:    (FORWARD_NULL)
/chart2/source/controller/main/ChartController_Tools.cxx: 272 in chart::ChartController::executeDispatch_Paste()()
266         {
267             if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
268             {
269                 std::unique_ptr<SvStream> xStm;
270                 if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
271                 {
>>>     CID 1596246:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
272                     xStm->Seek( 0 );
273                     Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) );
274     
275                     std::unique_ptr< SdrModel > spModel(
276                         new SdrModel());
277     
/chart2/source/controller/main/ChartController_Tools.cxx: 290 in chart::ChartController::executeDispatch_Paste()()
284             else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
285             {
286                 // graphic exchange format (graphic manager bitmap format?)
287                 std::unique_ptr<SvStream> xStm;
288                 if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ))
289                 {
>>>     CID 1596246:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
290                     TypeSerializer aSerializer(*xStm);
291                     aSerializer.readGraphic(aGraphic);
292                 }
293             }
294             else if( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ))
295             {

** CID 1596245:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/app/transobj.cxx: 502 in ScTransferObj::WriteObject(SvStream &, void *, unsigned int, const com::sun::star::datatransfer::DataFlavor &)()


________________________________________________________________________________________________________
*** CID 1596245:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/app/transobj.cxx: 502 in ScTransferObj::WriteObject(SvStream &, void *, unsigned int, const com::sun::star::datatransfer::DataFlavor &)()
496     
497                         uno::Reference<datatransfer::XTransferable> xEditTrans = pEngine->CreateTransferable( aSel );
498                         TransferableDataHelper aEditHelper( xEditTrans );
499     
500                         std::unique_ptr<SvStream> xStrm;
501                         bRet = aEditHelper.GetSotStorageStream( rFlavor, xStrm );
>>>     CID 1596245:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStrm".
502                         rOStm.WriteStream(*xStrm);
503                     }
504                 }
505                 break;
506     
507             case SCTRANS_TYPE_EDIT_ODF_TEXT_FLAT:

** CID 1596244:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2773 in SwTransferable::PasteSdrFormat(const TransferableDataHelper &, SwWrtShell &, SwPasteSdr, const Point *, SotExchangeActionFlags, bool)()


________________________________________________________________________________________________________
*** CID 1596244:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2773 in SwTransferable::PasteSdrFormat(const TransferableDataHelper &, SwWrtShell &, SwPasteSdr, const Point *, SotExchangeActionFlags, bool)()
2767                                         const Point* pPt, SotExchangeActionFlags nActionFlags, bool bNeedToSelectBeforePaste)
2768     {
2769         bool bRet = false;
2770         std::unique_ptr<SvStream> xStrm;
2771         if( rData.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStrm ))
2772         {
>>>     CID 1596244:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStrm".
2773             xStrm->SetVersion( SOFFICE_FILEFORMAT_50 );
2774     
2775             if(bNeedToSelectBeforePaste && pPt)
2776             {
2777                 // if this is an internal drag, need to set the target right (select it), else
2778                 // still the source will be selected

** CID 1596243:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 2025 in TransferableDataHelper::GetINetImage(const com::sun::star::datatransfer::DataFlavor &, INetImage &) const()


________________________________________________________________________________________________________
*** CID 1596243:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 2025 in TransferableDataHelper::GetINetImage(const com::sun::star::datatransfer::DataFlavor &, INetImage &) const()
2019             INetImage& rINtImg ) const
2020     {
2021         std::unique_ptr<SvStream> xStm;
2022         bool bRet = GetSotStorageStream( rFlavor, xStm );
2023     
2024         if( bRet )
>>>     CID 1596243:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
2025             bRet = rINtImg.Read( *xStm, SotExchange::GetFormat( rFlavor ) );
2026         return bRet;
2027     }
2028     
2029     
2030     bool TransferableDataHelper::GetFileList( SotClipboardFormatId nFormat,

** CID 1596242:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/svl/source/numbers/zforlist.cxx: 3992 in SvNFEngine::GetROPolicy(const SvNFFormatData &, std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, unsigned int>>> &)()


________________________________________________________________________________________________________
*** CID 1596242:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/svl/source/numbers/zforlist.cxx: 3992 in SvNFEngine::GetROPolicy(const SvNFFormatData &, std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, unsigned int>>> &)()
3986         }
3987     }
3988     
3989     SvNFEngine::Accessor SvNFEngine::GetROPolicy(const SvNFFormatData& rFormatData, SvNFFormatData::DefaultFormatKeysMap& rFormatCache)
3990     {
3991         assert(rFormatData.nDefaultSystemCurrencyFormat != NUMBERFORMAT_ENTRY_NOT_FOUND && "ensure PrepForRoMode is called");
>>>     CID 1596242:  Incorrect expression  (ASSERT_SIDE_EFFECT)
>>>     Argument "bCurrencyTableInitialized" of assert() has a side effect because the variable is volatile.  The containing function might work differently in a non-debug build.
3992         assert(bCurrencyTableInitialized && "ensure PrepForRoMode is called");
3993         return
3994         {
3995             std::bind(SvNFEngine::GetCLOffsetRO, std::ref(rFormatData), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3),
3996             std::bind(SvNFEngine::CacheFormatRO, std::ref(rFormatCache), std::placeholders::_1, std::placeholders::_2),
3997             std::bind(SvNFEngine::FindFormatRO, std::ref(rFormatData), std::ref(rFormatCache), std::placeholders::_1),

** CID 1596241:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1611 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1634 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1603 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1611 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
/vcl/source/treelist/transfer.cxx: 1603 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()


________________________________________________________________________________________________________
*** CID 1596241:    (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1611 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1605             }
1606             else if(!bSuppressJPEG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/jpeg"))
1607             {
1608                 // it's a JPEG, import to BitmapEx
1609                 GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
1610                 Graphic aGraphic;
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1611                 if (rFilter.ImportGraphic(aGraphic, u"", *xStm) == ERRCODE_NONE)
1612                     rBmpEx = aGraphic.GetBitmapEx();
1613             }
1614     
1615             if(rBmpEx.IsEmpty())
1616             {
/vcl/source/treelist/transfer.cxx: 1634 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1628                 else
1629                 {
1630                     rBmpEx = BitmapEx(aBitmap, aMask);
1631                 }
1632             }
1633     
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1634             bRet = (ERRCODE_NONE == xStm->GetError() && !rBmpEx.IsEmpty());
1635     
1636             /* SJ: #110748# At the moment we are having problems with DDB inserted as DIB. The
1637                problem is, that some graphics are inserted much too big because the nXPelsPerMeter
1638                and nYPelsPerMeter of the bitmap fileheader isn't including the correct value.
1639                Due to this reason the following code assumes that bitmaps with a logical size
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1616             {
1617                 Bitmap aBitmap;
1618                 AlphaMask aMask;
1619     
1620                 // explicitly use Bitmap::Read with bFileHeader = sal_True
1621                 // #i124085# keep DIBV5 for read from clipboard, but should not happen
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1622                 ReadDIBV5(aBitmap, aMask, *xStm);
1623     
1624                 if(aMask.GetBitmap().IsEmpty())
1625                 {
1626                     rBmpEx = aBitmap;
1627                 }
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1616             {
1617                 Bitmap aBitmap;
1618                 AlphaMask aMask;
1619     
1620                 // explicitly use Bitmap::Read with bFileHeader = sal_True
1621                 // #i124085# keep DIBV5 for read from clipboard, but should not happen
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1622                 ReadDIBV5(aBitmap, aMask, *xStm);
1623     
1624                 if(aMask.GetBitmap().IsEmpty())
1625                 {
1626                     rBmpEx = aBitmap;
1627                 }
/vcl/source/treelist/transfer.cxx: 1603 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1597     
1598         if(bRet)
1599         {
1600             if(!bSuppressPNG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/png"))
1601             {
1602                 // it's a PNG, import to BitmapEx
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1603                 vcl::PngImageReader aPNGReader(*xStm);
1604                 rBmpEx = aPNGReader.read();
1605             }
1606             else if(!bSuppressJPEG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/jpeg"))
1607             {
1608                 // it's a JPEG, import to BitmapEx
/vcl/source/treelist/transfer.cxx: 1611 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1605             }
1606             else if(!bSuppressJPEG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/jpeg"))
1607             {
1608                 // it's a JPEG, import to BitmapEx
1609                 GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
1610                 Graphic aGraphic;
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1611                 if (rFilter.ImportGraphic(aGraphic, u"", *xStm) == ERRCODE_NONE)
1612                     rBmpEx = aGraphic.GetBitmapEx();
1613             }
1614     
1615             if(rBmpEx.IsEmpty())
1616             {
/vcl/source/treelist/transfer.cxx: 1622 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1616             {
1617                 Bitmap aBitmap;
1618                 AlphaMask aMask;
1619     
1620                 // explicitly use Bitmap::Read with bFileHeader = sal_True
1621                 // #i124085# keep DIBV5 for read from clipboard, but should not happen
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1622                 ReadDIBV5(aBitmap, aMask, *xStm);
1623     
1624                 if(aMask.GetBitmap().IsEmpty())
1625                 {
1626                     rBmpEx = aBitmap;
1627                 }
/vcl/source/treelist/transfer.cxx: 1603 in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, BitmapEx &) const()
1597     
1598         if(bRet)
1599         {
1600             if(!bSuppressPNG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/png"))
1601             {
1602                 // it's a PNG, import to BitmapEx
>>>     CID 1596241:    (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1603                 vcl::PngImageReader aPNGReader(*xStm);
1604                 rBmpEx = aPNGReader.read();
1605             }
1606             else if(!bSuppressJPEG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/jpeg"))
1607             {
1608                 // it's a JPEG, import to BitmapEx

** CID 1596240:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1831 in TransferableDataHelper::GetImageMap(const com::sun::star::datatransfer::DataFlavor &, ImageMap &) const()


________________________________________________________________________________________________________
*** CID 1596240:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1831 in TransferableDataHelper::GetImageMap(const com::sun::star::datatransfer::DataFlavor &, ImageMap &) const()
1825     {
1826         std::unique_ptr<SvStream> xStm;
1827         bool bRet = GetSotStorageStream( rFlavor, xStm );
1828     
1829         if( bRet )
1830         {
>>>     CID 1596240:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1831             rIMap.Read( *xStm );
1832             bRet = ( xStm->GetError() == ERRCODE_NONE );
1833         }
1834     
1835         return bRet;
1836     }

** CID 1596239:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1807 in TransferableDataHelper::GetGraphic(const com::sun::star::datatransfer::DataFlavor &, Graphic &) const()


________________________________________________________________________________________________________
*** CID 1596239:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/treelist/transfer.cxx: 1807 in TransferableDataHelper::GetGraphic(const com::sun::star::datatransfer::DataFlavor &, Graphic &) const()
1801         else
1802         {
1803             std::unique_ptr<SvStream> xStm;
1804     
1805             if( GetSotStorageStream( rFlavor, xStm ) )
1806             {
>>>     CID 1596239:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xStm".
1807                 TypeSerializer aSerializer(*xStm);
1808                 aSerializer.readGraphic(rGraphic);
1809                 bRet = ( xStm->GetError() == ERRCODE_NONE );
1810             }
1811         }
1812     

** CID 1596238:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/gallery2/galtheme.cxx: 548 in GalleryTheme::InsertTransferable(const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, unsigned int)()


________________________________________________________________________________________________________
*** CID 1596238:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/gallery2/galtheme.cxx: 548 in GalleryTheme::InsertTransferable(const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, unsigned int)()
542     
543             if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
544             {
545                 std::unique_ptr<SvStream> xModelStm;
546     
547                 if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xModelStm ) )
>>>     CID 1596238:  Null pointer dereferences  (FORWARD_NULL)
>>>     Attempting to access the managed object of an empty smart pointer "xModelStm".
548                     bRet = InsertModelStream( *xModelStm, nInsertPos );
549             }
550             else if( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) ||
551                      aDataHelper.HasFormat( SotClipboardFormatId::SIMPLE_FILE ) )
552             {
553                 FileList aFileList;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DvwXh_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtzlANRv8Kt-2BPqoasNhO2mXR-2Bv2VustGiXlfRktlAKEczOxB5SvbYXe-2BKabOu3XBnoDteoxmoidakThDuxv5spyDGD-2FYwYl8am3VzQElwoqh4bq0UFzLGcbsoqHI4rpdfd5szA6GGd2RMqeJ41rLb5zms1qxcmRvzb6VbyNeUitj4-3D



More information about the LibreOffice mailing list