[Libreoffice-commits] core.git: sw/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 27 14:35:20 UTC 2020
sw/source/filter/ww8/wrtww8.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit d072f33fd6492ce10f696ae9e10793d814771c81
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Jun 27 10:43:26 2020 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 27 16:34:43 2020 +0200
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 at redhat.com>
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)
{
More information about the Libreoffice-commits
mailing list