summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-06-27 10:43:26 +0200
committerCaolán McNamara <caolanm@redhat.com>2020-06-27 16:34:43 +0200
commitd072f33fd6492ce10f696ae9e10793d814771c81 (patch)
tree1ed2f6358a0505657b89ce6ce11f7daa0935bc11
parenta81bc97c2b3a197d0521d5af3d9f255912533788 (diff)
cid#1464963: Null pointer dereferences (sw/wrtww8)
Change-Id: Iea4b91b440c87a8a193a3c6b683a017d0948399c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97281 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index a34f4cfe1ebc..a60852f752b4 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3728,7 +3728,7 @@ ErrCode SwWW8Writer::WriteStorage()
SotStorage * pStorage = m_pStg.get();
OUString sFileName;
sal_Int32 idx = 0;
- do
+ while (pStorage && idx >= 0)
{
OUString sPathElem = aStreamData.Name.getToken(0, L'/', idx);
if (!sPathElem.isEmpty())
@@ -3744,7 +3744,7 @@ ErrCode SwWW8Writer::WriteStorage()
break;
}
}
- } while (pStorage && idx >= 0);
+ };
if (!pStorage)
{