Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2869
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/69/2869/1
coverity#704628/704629/704630 Explicit null dereferenced
+ return early if no whichid or after default case
Change-Id: I40f3ec310604ccde22022dd2e82984b0f3057307
---
M editeng/source/rtf/rtfitem.cxx
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 462e688..fcc70ee 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -141,17 +141,17 @@
case 0:
// it exist no WhichId - don't set this item
- break;
+ return;
default:
rSet.Put( rItem );
- break;
+ return;
}
if( DOUBLEBYTE_CHARTYPE == eType )
{
- if( bIsLeftToRightDef && *pCJK )
+ if( bIsLeftToRightDef && pCJK )
{
rItem.SetWhich( *pCJK );
rSet.Put( rItem );
@@ -159,7 +159,7 @@
}
else if( !bIsLeftToRightDef )
{
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
@@ -169,7 +169,7 @@
{
if( LOW_CHARTYPE == eType )
{
- if( *pNormal )
+ if( pNormal )
{
rItem.SetWhich( *pNormal );
rSet.Put( rItem );
@@ -177,7 +177,7 @@
}
else if( HIGH_CHARTYPE == eType )
{
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
@@ -185,17 +185,17 @@
}
else
{
- if( *pCJK )
+ if( pCJK )
{
rItem.SetWhich( *pCJK );
rSet.Put( rItem );
}
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
}
- if( *pNormal )
+ if( pNormal )
{
rItem.SetWhich( *pNormal );
rSet.Put( rItem );
--
To view, visit https://gerrit.libreoffice.org/2869
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40f3ec310604ccde22022dd2e82984b0f3057307
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Julien Nabet <serval2412@yahoo.fr>
Context
- [PATCH] coverity#704628/704629/704630 Explicit null dereferenced · Julien Nabet (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.