New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Thu Nov 14 08:10:33 UTC 2019


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


** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/drwtxtex.cxx: 660 in SwDrawTextShell::Execute(SfxRequest &)()


________________________________________________________________________________________________________
*** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/drwtxtex.cxx: 660 in SwDrawTextShell::Execute(SfxRequest &)()
654                 return;
655         }
656     
657         std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
658         lcl_convertStringArguments(nSlot, pNewArgs);
659     
>>>     CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "pNewAttrs" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
660         if(nEEWhich && pNewAttrs)
661         {
662             std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
663             pNewArgs->Put(*pNewItem);
664         }
665     

** CID 1455690:    (FORWARD_NULL)
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()


________________________________________________________________________________________________________
*** CID 1455690:    (FORWARD_NULL)
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()
651     
652             default:
653                 assert(false && "wrong dispatcher");
654                 return;
655         }
656     
>>>     CID 1455690:    (FORWARD_NULL)
>>>     Passing null pointer "pNewAttrs" to "Clone", which dereferences it. (The dereference happens because this is a virtual function call.)
657         std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
658         lcl_convertStringArguments(nSlot, pNewArgs);
659     
660         if(nEEWhich && pNewAttrs)
661         {
662             std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()
651     
652             default:
653                 assert(false && "wrong dispatcher");
654                 return;
655         }
656     
>>>     CID 1455690:    (FORWARD_NULL)
>>>     Passing null pointer "pNewAttrs" to "Clone", which dereferences it. (The dereference happens because this is a virtual function call.)
657         std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
658         lcl_convertStringArguments(nSlot, pNewArgs);
659     
660         if(nEEWhich && pNewAttrs)
661         {
662             std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
/sw/source/uibase/shells/drwtxtex.cxx: 657 in SwDrawTextShell::Execute(SfxRequest &)()
651     
652             default:
653                 assert(false && "wrong dispatcher");
654                 return;
655         }
656     
>>>     CID 1455690:    (FORWARD_NULL)
>>>     Passing null pointer "pNewAttrs" to "Clone", which dereferences it. (The dereference happens because this is a virtual function call.)
657         std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
658         lcl_convertStringArguments(nSlot, pNewArgs);
659     
660         if(nEEWhich && pNewAttrs)
661         {
662             std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyMBjgoBPr6OvIPI1yFkizWcx7rLkipIryJLRhQeJLwz40KB7lraFV86-2BYG7UV4k7LWe1JWkgJOBLbZeO1kt4nAuhV-2FD3Uv0hIM1IsP7j2yhjqjzv8Z35msFxwQzKPZiE-2F-2BopuQeykj-2FAvexQx6h90aOAj5h8DG-2BS1GhBfL8tjvHA-3D



More information about the LibreOffice mailing list