Kaydet (Commit) a48b5c8e authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#10056 Null deref

Change-Id: I9ea0f272d0a8b13fb51fec55ac57adca47cafc77
Reviewed-on: https://gerrit.libreoffice.org/59596Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 621611f6
......@@ -316,12 +316,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment