writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
New commits: commit 48c677d55330ac6caf0065fa1776c985b876eead Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Aug 25 19:08:35 2018 +0100 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Thu Aug 30 16:58:54 2018 +0200 ofz#10056 Null deref Change-Id: I9ea0f272d0a8b13fb51fec55ac57adca47cafc77 Reviewed-on: https://gerrit.libreoffice.org/59601 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 2d96312be119..7e742690d32b 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -315,12 +315,20 @@ bool OOXMLStreamImpl::lcl_getTarget(const uno::Reference<embed::XRelationshipAcc // simple string concatenation here to handle that. uno::Reference<uri::XUriReference> xPart = xFac->parse(sMyTarget); uno::Reference<uri::XUriReference> xAbs = xFac->makeAbsolute(xBase, xPart, true, uri::RelativeUriExcessParentSegments_RETAIN); - rDocumentTarget = xAbs->getPath(); - // path will start with the fragment separator. need to - // remove that - rDocumentTarget = rDocumentTarget.copy( 1 ); - if(sStreamType == sEmbeddingsType) - embeddingsTarget = rDocumentTarget; + if (!xAbs) + { + //it was invalid gibberish + bFound = false; + } + else + { + rDocumentTarget = xAbs->getPath(); + // path will start with the fragment separator. need to + // remove that + rDocumentTarget = rDocumentTarget.copy( 1 ); + if(sStreamType == sEmbeddingsType) + embeddingsTarget = rDocumentTarget; + } } break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits