New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sat Oct 7 10:52:43 UTC 2017


Hi,

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

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


** CID 1418980:    (RESOURCE_LEAK)
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()


________________________________________________________________________________________________________
*** CID 1418980:    (RESOURCE_LEAK)
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
1062     
1063                         sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList);
1064                         pFS->singleElementNS(XML_w, XML_documentProtection, xAttributeList);
1065     
1066                         hasProtectionProperties = true;
1067                     }
>>>     CID 1418980:    (RESOURCE_LEAK)
>>>     Variable "pAttributeList" going out of scope leaks the storage it points to.
1068                 }
1069             }
1070         }
1071     
1072         // Protect form
1073         // Section-specific write protection
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
1062     
1063                         sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList);
1064                         pFS->singleElementNS(XML_w, XML_documentProtection, xAttributeList);
1065     
1066                         hasProtectionProperties = true;
1067                     }
>>>     CID 1418980:    (RESOURCE_LEAK)
>>>     Variable "pAttributeList" going out of scope leaks the storage it points to.
1068                 }
1069             }
1070         }
1071     
1072         // Protect form
1073         // Section-specific write protection

** CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/edit/edfcol.cxx: 1232 in SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, const com::sun::star::uno::Reference<com::sun::star::text::XTextContent> &, bool)()


________________________________________________________________________________________________________
*** CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/edit/edfcol.cxx: 1232 in SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, const com::sun::star::uno::Reference<com::sun::star::text::XTextContent> &, bool)()
1226         const auto it = aStatements.find(ParagraphSignatureRDFName);
1227         if (it != aStatements.end())
1228             m_signature = it->second;
1229     
1230         const auto it2 = aStatements.find(ParagraphSignatureUsageRDFName);
1231         if (it2 != aStatements.end())
>>>     CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
>>>     Dereferencing iterator "it" though it is already past the end of its container.
1232             m_usage = it->second;
1233     
1234         uno::Reference<css::text::XTextRange> xText(m_xField, uno::UNO_QUERY);
1235         m_display = xText->getString();
1236     }
1237     

** CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
/sw/source/core/edit/edfcol.cxx: 1232 in SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, const com::sun::star::uno::Reference<com::sun::star::text::XTextContent> &, bool)()


________________________________________________________________________________________________________
*** CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
/sw/source/core/edit/edfcol.cxx: 1232 in SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const com::sun::star::uno::Reference<com::sun::star::text::XTextField> &, const com::sun::star::uno::Reference<com::sun::star::text::XTextContent> &, bool)()
1226         const auto it = aStatements.find(ParagraphSignatureRDFName);
1227         if (it != aStatements.end())
1228             m_signature = it->second;
1229     
1230         const auto it2 = aStatements.find(ParagraphSignatureUsageRDFName);
1231         if (it2 != aStatements.end())
>>>     CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "it" looks like a copy-paste error.
1232             m_usage = it->second;
1233     
1234         uno::Reference<css::text::XTextRange> xText(m_xField, uno::UNO_QUERY);
1235         m_display = xText->getString();
1236     }
1237     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfCGDqp3k-2Fc5S3-2BFMC4UxLGuv-2FigefyuQYHgYrZtg7TpmUbbn-2FWaWLwKUM4tMp-2FFGoQV4Z8rMzRuBbp1hP-2BhuinEerbp0u80IS-2FUqKrPdpiWwVHVCeiB1g-2BoleSsW2htcOtU9HkfeamjKVMjbqZJrMo47PsXbjhJdeVuv4D0Uox0-3D

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfCGDqp3k-2Fc5S3-2BFMC4UxLKhcD3jnD3xnzt2nOfAF6z63pCLg0aq0-2BOumGiS05fuA7Ye-2BheDsZQnGMnfnxp8evkQWApvDfaGkm3qSIyslvbUuKLRnpqjPytTTdILmulQRNWxkjy1MP2oljtV3spZtTYcMsXHf4SL1ZkabbCgAYOk-3D



More information about the LibreOffice mailing list